aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-08-19 12:26:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-08-30 21:52:07 +0200
commit3231e7ab64efaf073037f2bab08f0e8b1f0116d0 (patch)
treeb735daeb0089c67eab6d4bc523deba4d11e9c6c2
parent552fe9b07f6b0cd6879869e1b4a17e9293fbd5a5 (diff)
downloadffmpeg-3231e7ab64efaf073037f2bab08f0e8b1f0116d0.tar.gz
wavpack: report if there is no bits left
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 11a39bdf534a4ead634b4a593c66ebf756910b9b) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/wavpack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 36f3ad7767..2493089d20 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -398,6 +398,10 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
return sign ? ~ret : ret;
error:
+ ret = get_bits_left(gb);
+ if (ret <= 0) {
+ av_log(ctx->avctx, AV_LOG_ERROR, "Too few bits (%d) left\n", ret);
+ }
*last = 1;
return 0;
}