changeset 4503:f334529b46ec libavcodec

sanity check
author michael
date Fri, 09 Feb 2007 02:25:23 +0000
parents ff5472c81ab8
children 6287a2ff4d08
files error_resilience.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/error_resilience.c	Fri Feb 09 02:21:34 2007 +0000
+++ b/error_resilience.c	Fri Feb 09 02:25:23 2007 +0000
@@ -618,6 +618,11 @@
     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;