[SCM] libav/experimental: sanity check

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:56:08 UTC 2013


The following commit has been merged in the experimental branch:
commit 04cfef21ff25e30005d3b2a42bc145324e580a2f
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Fri Feb 9 02:25:23 2007 +0000

    sanity check
    
    Originally committed as revision 7890 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 0923721..2e15df3 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -618,6 +618,11 @@ void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int en
     const int end_xy  = s->mb_index2xy[end_i];
     int mask= -1;
 
+    if(start_i > end_i || start_xy > end_xy){
+        av_log(s->avctx, AV_LOG_ERROR, "internal error, slice end before start\n");
+        return;
+    }
+
     if(!s->error_resilience) return;
 
     mask &= ~VP_START;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list