comparison h263dec.c @ 160:1bf8c111691d libavcodec

- Bug fixed on H.263 decoder initialization.
author pulento
date Sat, 17 Nov 2001 15:43:04 +0000
parents f914f710b8d0
children 7ce36cf13055
comparison
equal deleted inserted replaced
159:660233346f4f 160:1bf8c111691d
111 ret = mpeg4_decode_picture_header(s); 111 ret = mpeg4_decode_picture_header(s);
112 } else if (s->h263_intel) { 112 } else if (s->h263_intel) {
113 ret = intel_h263_decode_picture_header(s); 113 ret = intel_h263_decode_picture_header(s);
114 } else { 114 } else {
115 ret = h263_decode_picture_header(s); 115 ret = h263_decode_picture_header(s);
116 /* After H263 header decode we have the height, width, */ 116 /* After H263 header decode we have the height, width, */
117 /* and other parameters. So then we could init the picture */ 117 /* and other parameters. So then we could init the picture */
118 if (s->width != avctx->width || s->height != avctx->height) { 118 /* FIXME: By the way H263 decoder is evolving it should have */
119 /* an H263EncContext */
120 if (!s->context_initialized) {
119 avctx->width = s->width; 121 avctx->width = s->width;
120 avctx->height = s->height; 122 avctx->height = s->height;
121 /* FIXME: By the way H263 decoder is evolving it should have */ 123 if (MPV_common_init(s) < 0)
122 /* an H263EncContext */ 124 return -1;
125 } else if (s->width != avctx->width || s->height != avctx->height) {
126 /* H.263 could change picture size any time */
127 MPV_common_end(s);
123 if (MPV_common_init(s) < 0) 128 if (MPV_common_init(s) < 0)
124 return -1; 129 return -1;
125 } 130 }
126 } 131 }
127 if (ret < 0) 132 if (ret < 0)