mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
libFLAC++: Delete decoder and encoder before return if they're not valid
This commit is contained in:
committed by
Erik de Castro Lopo
parent
6455e47721
commit
1f578f1b71
@@ -459,6 +459,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg)
|
|||||||
printf("testing is_valid()... ");
|
printf("testing is_valid()... ");
|
||||||
if(!decoder->is_valid()) {
|
if(!decoder->is_valid()) {
|
||||||
printf("FAILED, returned false\n");
|
printf("FAILED, returned false\n");
|
||||||
|
delete decoder;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
@@ -481,6 +482,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg)
|
|||||||
printf("testing is_valid()... ");
|
printf("testing is_valid()... ");
|
||||||
if(!decoder->is_valid()) {
|
if(!decoder->is_valid()) {
|
||||||
printf("FAILED, returned false\n");
|
printf("FAILED, returned false\n");
|
||||||
|
delete decoder;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
@@ -532,6 +534,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg)
|
|||||||
printf("testing is_valid()... ");
|
printf("testing is_valid()... ");
|
||||||
if(!decoder->is_valid()) {
|
if(!decoder->is_valid()) {
|
||||||
printf("FAILED, returned false\n");
|
printf("FAILED, returned false\n");
|
||||||
|
delete decoder;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ static bool test_stream_encoder(Layer layer, bool is_ogg)
|
|||||||
printf("testing is_valid()... ");
|
printf("testing is_valid()... ");
|
||||||
if(!encoder->is_valid()) {
|
if(!encoder->is_valid()) {
|
||||||
printf("FAILED, returned false\n");
|
printf("FAILED, returned false\n");
|
||||||
|
delete decoder;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user