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-11-28 18:44:37 +0100
commit656bf0ca79baa7adb64df7c71b8ad6211fb99cdb (patch)
treefc48ca83cac96014db232d10ef769833b082c7f1
parent407982b8f945f66aa60afbdffe3247ceb26e5ae8 (diff)
downloadffmpeg-656bf0ca79baa7adb64df7c71b8ad6211fb99cdb.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 203cd28f6d..367150cbb0 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -253,6 +253,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;
}