[FFmpeg-cvslog] ffv1dec: detect errors in bytestream end mismatches for EC

Michael Niedermayer git at videolan.org
Mon Jul 16 15:54:08 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul 16 15:41:40 2012 +0200| [ac9389a6633dd4bb355f7c0419bd0af7da22e308] | committer: Michael Niedermayer

ffv1dec: detect errors in bytestream end mismatches for EC

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

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

 libavcodec/ffv1.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 41c27ce..3160817 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1648,6 +1648,13 @@ static int decode_slice(AVCodecContext *c, void *arg){
     }else{
         decode_rgb_frame(fs, (uint32_t*)p->data[0] + ps*x + y*(p->linesize[0]/4), width, height, p->linesize[0]/4);
     }
+    if(fs->ac && f->version > 2) {
+        int v = fs->c.bytestream_end - fs->c.bytestream - 3 - 5*f->ec;
+        if(v != -1 && v!= 0) {
+            av_log(f->avctx, AV_LOG_ERROR, "bytestream end mismatching by %d\n", v);
+            fs->slice_damaged = 1;
+        }
+    }
 
     emms_c();
 



More information about the ffmpeg-cvslog mailing list