* prevent crash in decoder

Originally committed as revision 179 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Zdenek Kabelac 24 years ago
parent 9736722ad7
commit 525782f33f
  1. 2
      libavcodec/msmpeg4.c

@ -664,7 +664,7 @@ int msmpeg4_decode_mb(MpegEncContext *s,
/* special slice handling */ /* special slice handling */
if (s->mb_x == 0) { if (s->mb_x == 0) {
if ((s->mb_y % s->slice_height) == 0) { if (s->slice_height && (s->mb_y % s->slice_height) == 0) {
int wrap; int wrap;
/* reset DC pred (set previous line to 1024) */ /* reset DC pred (set previous line to 1024) */
wrap = 2 * s->mb_width + 2; wrap = 2 * s->mb_width + 2;

Loading…
Cancel
Save