aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-08-19 12:26:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-10-03 02:51:57 +0200
commitf74206cb40ee966ebb1b1bb2e1a4efe92d1206e0 (patch)
tree1af5eb5181674f6350629b2e26ef748dcd98f87f /libavcodec/wavpack.c
parent148d9cd122272e525288e2d9758c4dcb7db3731b (diff)
downloadffmpeg-f74206cb40ee966ebb1b1bb2e1a4efe92d1206e0.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>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 7c60f78b66..9f72ebef2b 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;
}