# HG changeset patch # User pulento # Date 1006011784 0 # Node ID 1bf8c111691d1318f114ab142ba481bbb0528067 # Parent 660233346f4f1d28910b6d9a13cf3ca9353a44da - Bug fixed on H.263 decoder initialization. diff -r 660233346f4f -r 1bf8c111691d h263dec.c --- a/h263dec.c Fri Nov 16 19:13:03 2001 +0000 +++ b/h263dec.c Sat Nov 17 15:43:04 2001 +0000 @@ -113,13 +113,18 @@ ret = intel_h263_decode_picture_header(s); } else { ret = h263_decode_picture_header(s); - /* After H263 header decode we have the height, width, */ - /* and other parameters. So then we could init the picture */ - if (s->width != avctx->width || s->height != avctx->height) { + /* After H263 header decode we have the height, width, */ + /* and other parameters. So then we could init the picture */ + /* FIXME: By the way H263 decoder is evolving it should have */ + /* an H263EncContext */ + if (!s->context_initialized) { avctx->width = s->width; avctx->height = s->height; - /* FIXME: By the way H263 decoder is evolving it should have */ - /* an H263EncContext */ + if (MPV_common_init(s) < 0) + 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) return -1; }