diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-04-24 17:20:26 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-04-24 17:20:26 +0200 |
commit | f09fdf2d9c0f5acc60c4572b6d7bb211f7a2aca0 (patch) | |
tree | 63753e922b9e681bafa64a2b7532d3bc680ec8ae /libavcodec | |
parent | e34751cb8a1d2dede869f6e69730e53e06caf922 (diff) | |
download | ffmpeg-f09fdf2d9c0f5acc60c4572b6d7bb211f7a2aca0.tar.gz |
avcodec/clearvideo: display warning if decoder overreads input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/clearvideo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index b4bfa3bda3..0e3c772123 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -637,6 +637,9 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, *got_frame = 1; + if (get_bits_left(&c->gb) < 0) + av_log(c->avctx, AV_LOG_WARNING, "overread %d\n", -get_bits_left(&c->gb)); + return mb_ret < 0 ? mb_ret : buf_size; } |