libFLAC++: Delete decoder and encoder before return if they're not valid
This commit is contained in:
parent
6455e47721
commit
1f578f1b71
@ -459,6 +459,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg)
|
||||
printf("testing is_valid()... ");
|
||||
if(!decoder->is_valid()) {
|
||||
printf("FAILED, returned false\n");
|
||||
delete decoder;
|
||||
return false;
|
||||
}
|
||||
printf("OK\n");
|
||||
@ -481,6 +482,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg)
|
||||
printf("testing is_valid()... ");
|
||||
if(!decoder->is_valid()) {
|
||||
printf("FAILED, returned false\n");
|
||||
delete decoder;
|
||||
return false;
|
||||
}
|
||||
printf("OK\n");
|
||||
@ -532,6 +534,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg)
|
||||
printf("testing is_valid()... ");
|
||||
if(!decoder->is_valid()) {
|
||||
printf("FAILED, returned false\n");
|
||||
delete decoder;
|
||||
return false;
|
||||
}
|
||||
printf("OK\n");
|
||||
|
@ -215,6 +215,7 @@ static bool test_stream_encoder(Layer layer, bool is_ogg)
|
||||
printf("testing is_valid()... ");
|
||||
if(!encoder->is_valid()) {
|
||||
printf("FAILED, returned false\n");
|
||||
delete decoder;
|
||||
return false;
|
||||
}
|
||||
printf("OK\n");
|
||||
|
Loading…
Reference in New Issue
Block a user