aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/error_resilience.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-02-09 02:25:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-02-09 02:25:23 +0000
commit04cfef21ff25e30005d3b2a42bc145324e580a2f (patch)
tree6e81b802e2169d0a3c43ae4eb2eede950c5ff8e6 /libavcodec/error_resilience.c
parent960964f5a9ad9d8e90aaeae9130fe81e80ce4ddf (diff)
downloadffmpeg-04cfef21ff25e30005d3b2a42bc145324e580a2f.tar.gz
sanity check
Originally committed as revision 7890 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r--libavcodec/error_resilience.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 0923721ee6..2e15df3d2f 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;