ffmpeg | branch: master | Paul B Mahol <[email protected]> | Tue Apr 24 17:20:26 
2018 +0200| [f09fdf2d9c0f5acc60c4572b6d7bb211f7a2aca0] | committer: Paul B Mahol

avcodec/clearvideo: display warning if decoder overreads input

Signed-off-by: Paul B Mahol <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f09fdf2d9c0f5acc60c4572b6d7bb211f7a2aca0
---

 libavcodec/clearvideo.c | 3 +++
 1 file changed, 3 insertions(+)

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

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to