diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-08-19 16:26:47 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-19 19:47:46 +0400 |
commit | 11a39bdf534a4ead634b4a593c66ebf756910b9b (patch) | |
tree | ea92f43f2809f0c74d42db9d94ce6fa5aed885eb | |
parent | ea97859c8c218b83ab747a7eabcb88ca446f6751 (diff) |
wavpack: report if there is no bits left
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/wavpack.c | 4 |
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; } |