Browse Source

sanity check

Originally committed as revision 7890 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 18 years ago
parent
commit
04cfef21ff
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/error_resilience.c

+ 5
- 0
libavcodec/error_resilience.c View File

@@ -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]; const int end_xy = s->mb_index2xy[end_i];
int mask= -1; 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; if(!s->error_resilience) return;


mask &= ~VP_START; mask &= ~VP_START;


Loading…
Cancel
Save