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 11a39bdf53)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Christophe Gisquet 2014-08-19 12:26:47 +00:00 committed by Michael Niedermayer
parent 407982b8f9
commit 656bf0ca79
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}