summaryrefslogtreecommitdiff
path: root/libavcodec/clearvideo.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-04-24 17:20:26 +0200
committerPaul B Mahol <onemda@gmail.com>2018-04-24 17:20:26 +0200
commitf09fdf2d9c0f5acc60c4572b6d7bb211f7a2aca0 (patch)
tree63753e922b9e681bafa64a2b7532d3bc680ec8ae /libavcodec/clearvideo.c
parente34751cb8a1d2dede869f6e69730e53e06caf922 (diff)
avcodec/clearvideo: display warning if decoder overreads input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/clearvideo.c')
-rw-r--r--libavcodec/clearvideo.c3
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;
}