[FFmpeg-cvslog] ffv1dec: change bitstream end check to a exact check instead of a +-1 check

Michael Niedermayer git at videolan.org
Tue Sep 25 03:49:03 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Sep 24 04:58:24 2012 +0200| [aea15df3b4c264b5b13d5f85341f52c7ec756c6f] | committer: Michael Niedermayer

ffv1dec: change bitstream end check to a exact check instead of a +-1 check

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ffv1.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 210400b..e8fccb6 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1706,8 +1706,10 @@ static int decode_slice(AVCodecContext *c, void *arg){
         decode_rgb_frame(fs, planes, width, height, p->linesize);
     }
     if(fs->ac && f->version > 2) {
-        int v = fs->c.bytestream_end - fs->c.bytestream - 3 - 5*f->ec;
-        if(v != -1 && v!= 0) {
+        int v;
+        get_rac(&fs->c, (int[]){129});
+        v = fs->c.bytestream_end - fs->c.bytestream - 2 - 5*f->ec;
+        if(v) {
             av_log(f->avctx, AV_LOG_ERROR, "bytestream end mismatching by %d\n", v);
             fs->slice_damaged = 1;
         }



More information about the ffmpeg-cvslog mailing list