summaryrefslogtreecommitdiff
path: root/src/test_libFLAC++/encoders.cpp
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2006-11-09 06:58:26 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2006-11-09 06:58:26 +0000
commita586226fda6f6a3781adb0f117554917b1e945ea (patch)
tree7e0fc8d36a48b685aa2fff79a114d761669d71f8 /src/test_libFLAC++/encoders.cpp
parent38bf3e6ca9fa103e5ce2bc8ee922d6e36e457298 (diff)
downloadflac-a586226fda6f6a3781adb0f117554917b1e945ea.tar.gz
add a boolean return value to FLAC__stream_encoder_finish() that signals a verify mismatch
Diffstat (limited to 'src/test_libFLAC++/encoders.cpp')
-rw-r--r--src/test_libFLAC++/encoders.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test_libFLAC++/encoders.cpp b/src/test_libFLAC++/encoders.cpp
index 14364988..acb1ec37 100644
--- a/src/test_libFLAC++/encoders.cpp
+++ b/src/test_libFLAC++/encoders.cpp
@@ -473,7 +473,11 @@ static bool test_stream_encoder(Layer layer, bool is_ogg)
printf("OK\n");
printf("testing finish()... ");
- encoder->finish();
+ if(!encoder->finish()) {
+ FLAC::Encoder::Stream::State state = encoder->get_state();
+ printf("FAILED, returned false, state = %u (%s)\n", (unsigned)((::FLAC__StreamEncoderState)state), state.as_cstring());
+ return false;
+ }
printf("OK\n");
printf("freeing encoder instance... ");