comparison mpeg12.c @ 1953:98d46737196b libavcodec

corrupted field pictures segfault fix
author michael
date Thu, 22 Apr 2004 21:41:08 +0000
parents d10578f7fd40
children c8e866f4515f
comparison
equal deleted inserted replaced
1952:2ede7cc1fe4e 1953:98d46737196b
2248 const int field_pic= s->picture_structure != PICT_FRAME; 2248 const int field_pic= s->picture_structure != PICT_FRAME;
2249 2249
2250 s->resync_mb_x= 2250 s->resync_mb_x=
2251 s->resync_mb_y= -1; 2251 s->resync_mb_y= -1;
2252 2252
2253 if (mb_y >= s->mb_height){ 2253 if (mb_y<<field_pic >= s->mb_height){
2254 av_log(s->avctx, AV_LOG_ERROR, "slice below image (%d >= %d)\n", s->mb_y, s->mb_height); 2254 av_log(s->avctx, AV_LOG_ERROR, "slice below image (%d >= %d)\n", mb_y, s->mb_height);
2255 return -1; 2255 return -1;
2256 } 2256 }
2257 2257
2258 init_get_bits(&s->gb, *buf, buf_size*8); 2258 init_get_bits(&s->gb, *buf, buf_size*8);
2259 2259