diff options
author | Juanjo <pulento@users.sourceforge.net> | 2001-11-17 15:43:04 +0000 |
---|---|---|
committer | Juanjo <pulento@users.sourceforge.net> | 2001-11-17 15:43:04 +0000 |
commit | 9eaa46906b83bab588b8a30aa58e6b7095b8d8f5 (patch) | |
tree | aff9023f3c18f12c48e7e4f4fb3ff18288ab95b5 | |
parent | 21810797bcd2100828bbf64f228e7d57a5c3ae8a (diff) | |
download | ffmpeg-9eaa46906b83bab588b8a30aa58e6b7095b8d8f5.tar.gz |
- Bug fixed on H.263 decoder initialization.
Originally committed as revision 220 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h263dec.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 8f1cfbce21..5db4bc6b40 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -113,13 +113,18 @@ static int h263_decode_frame(AVCodecContext *avctx, 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; } |