- Bug fixed on H.263 decoder initialization.
Originally committed as revision 220 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -113,13 +113,18 @@ static int h263_decode_frame(AVCodecContext *avctx,
|
|||||||
ret = intel_h263_decode_picture_header(s);
|
ret = intel_h263_decode_picture_header(s);
|
||||||
} else {
|
} else {
|
||||||
ret = h263_decode_picture_header(s);
|
ret = h263_decode_picture_header(s);
|
||||||
/* After H263 header decode we have the height, width, */
|
/* After H263 header decode we have the height, width, */
|
||||||
/* and other parameters. So then we could init the picture */
|
/* and other parameters. So then we could init the picture */
|
||||||
if (s->width != avctx->width || s->height != avctx->height) {
|
/* FIXME: By the way H263 decoder is evolving it should have */
|
||||||
|
/* an H263EncContext */
|
||||||
|
if (!s->context_initialized) {
|
||||||
avctx->width = s->width;
|
avctx->width = s->width;
|
||||||
avctx->height = s->height;
|
avctx->height = s->height;
|
||||||
/* FIXME: By the way H263 decoder is evolving it should have */
|
if (MPV_common_init(s) < 0)
|
||||||
/* an H263EncContext */
|
return -1;
|
||||||
|
} else if (s->width != avctx->width || s->height != avctx->height) {
|
||||||
|
/* H.263 could change picture size any time */
|
||||||
|
MPV_common_end(s);
|
||||||
if (MPV_common_init(s) < 0)
|
if (MPV_common_init(s) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user