comparison vp6.c @ 8329:8b6bcfa22aa8 libavcodec

vp56: don't reset dimensions to 0 in codec init
author aurel
date Mon, 15 Dec 2008 00:00:16 +0000
parents 3cddc18caeca
children e9d9d946f213
comparison
equal deleted inserted replaced
8328:2e654989814e 8329:8b6bcfa22aa8
73 rows = buf[2]; /* number of stored macroblock rows */ 73 rows = buf[2]; /* number of stored macroblock rows */
74 cols = buf[3]; /* number of stored macroblock cols */ 74 cols = buf[3]; /* number of stored macroblock cols */
75 /* buf[4] is number of displayed macroblock rows */ 75 /* buf[4] is number of displayed macroblock rows */
76 /* buf[5] is number of displayed macroblock cols */ 76 /* buf[5] is number of displayed macroblock cols */
77 77
78 if (16*cols != s->avctx->coded_width || 78 if (!s->macroblocks || /* first frame */
79 16*cols != s->avctx->coded_width ||
79 16*rows != s->avctx->coded_height) { 80 16*rows != s->avctx->coded_height) {
80 avcodec_set_dimensions(s->avctx, 16*cols, 16*rows); 81 avcodec_set_dimensions(s->avctx, 16*cols, 16*rows);
81 if (s->avctx->extradata_size == 1) { 82 if (s->avctx->extradata_size == 1) {
82 s->avctx->width -= s->avctx->extradata[0] >> 4; 83 s->avctx->width -= s->avctx->extradata[0] >> 4;
83 s->avctx->height -= s->avctx->extradata[0] & 0x0F; 84 s->avctx->height -= s->avctx->extradata[0] & 0x0F;