[FFmpeg-cvslog] wavpack: add an error message to a failure.

Anton Khirnov git at videolan.org
Tue May 28 11:12:42 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun May 26 10:38:54 2013 +0200| [0f3a0b24dd6f595feaa4526e52ffa7d05c3d7840] | committer: Anton Khirnov

wavpack: add an error message to a failure.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f3a0b24dd6f595feaa4526e52ffa7d05c3d7840
---

 libavcodec/wavpack.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 81b310f..fa3682b 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -792,8 +792,11 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
 
     if (!wc->mkv_mode) {
         s->samples = bytestream2_get_le32(&gb);
-        if (s->samples != wc->samples)
+        if (s->samples != wc->samples) {
+            av_log(avctx, AV_LOG_ERROR, "Mismatching number of samples in "
+                   "a sequence: %d and %d\n", wc->samples, s->samples);
             return AVERROR_INVALIDDATA;
+        }
 
         if (!s->samples) {
             *got_frame_ptr = 0;



More information about the ffmpeg-cvslog mailing list