comparison mpeg4video_parser.c @ 10641:9311c65558c0 libavcodec

Make sure the parsers do not overwrite width/height as this can interfere with the decoder. Fixes issue1135.
author michael
date Sat, 05 Dec 2009 03:53:12 +0000
parents 043574c5c153
children 20752e8b2657
comparison
equal deleted inserted replaced
10640:e3e0c834590e 10641:9311c65558c0
80 ret = ff_mpeg4_decode_picture_header(s, gb); 80 ret = ff_mpeg4_decode_picture_header(s, gb);
81 } 81 }
82 82
83 init_get_bits(gb, buf, 8 * buf_size); 83 init_get_bits(gb, buf, 8 * buf_size);
84 ret = ff_mpeg4_decode_picture_header(s, gb); 84 ret = ff_mpeg4_decode_picture_header(s, gb);
85 if (s->width) { 85 if (s->width && (!avctx->width || !avctx->height || !avctx->coded_width || !avctx->coded_height)) {
86 avcodec_set_dimensions(avctx, s->width, s->height); 86 avcodec_set_dimensions(avctx, s->width, s->height);
87 } 87 }
88 s1->pict_type= s->pict_type; 88 s1->pict_type= s->pict_type;
89 pc->first_picture = 0; 89 pc->first_picture = 0;
90 return ret; 90 return ret;