diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-08-19 12:26:47 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-20 18:40:33 +0200 |
commit | dd9b24a48808b9cd31b93e517ff228f497b51b83 (patch) | |
tree | 0a967270aa2d92410cdec24c10896105a11075d7 /libavcodec/wavpack.c | |
parent | 16b5df17ea9d7b9b0b10b1effa776177ac69d88c (diff) | |
download | ffmpeg-dd9b24a48808b9cd31b93e517ff228f497b51b83.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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 6f60514a28..0428b05128 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; } |