# HG changeset patch # User aurel # Date 1229299216 0 # Node ID 8b6bcfa22aa8dda11c1942b8f4aaefffd3865b31 # Parent 2e654989814e36829d5ac99de961052b7976ee66 vp56: don't reset dimensions to 0 in codec init diff -r 2e654989814e -r 8b6bcfa22aa8 vp5.c --- a/vp5.c Sun Dec 14 21:38:03 2008 +0000 +++ b/vp5.c Mon Dec 15 00:00:16 2008 +0000 @@ -58,7 +58,8 @@ vp56_rac_gets(c, 8); /* number of displayed macroblock rows */ vp56_rac_gets(c, 8); /* number of displayed macroblock cols */ vp56_rac_gets(c, 2); - if (16*cols != s->avctx->coded_width || + if (!s->macroblocks || /* first frame */ + 16*cols != s->avctx->coded_width || 16*rows != s->avctx->coded_height) { avcodec_set_dimensions(s->avctx, 16*cols, 16*rows); return 2; diff -r 2e654989814e -r 8b6bcfa22aa8 vp56.c --- a/vp56.c Sun Dec 14 21:38:03 2008 +0000 +++ b/vp56.c Mon Dec 15 00:00:16 2008 +0000 @@ -657,8 +657,6 @@ dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->scantable,ff_zigzag_direct); - avcodec_set_dimensions(avctx, 0, 0); - for (i=0; i<4; i++) s->framep[i] = &s->frames[i]; s->framep[VP56_FRAME_UNUSED] = s->framep[VP56_FRAME_GOLDEN]; diff -r 2e654989814e -r 8b6bcfa22aa8 vp6.c --- a/vp6.c Sun Dec 14 21:38:03 2008 +0000 +++ b/vp6.c Mon Dec 15 00:00:16 2008 +0000 @@ -75,7 +75,8 @@ /* buf[4] is number of displayed macroblock rows */ /* buf[5] is number of displayed macroblock cols */ - if (16*cols != s->avctx->coded_width || + if (!s->macroblocks || /* first frame */ + 16*cols != s->avctx->coded_width || 16*rows != s->avctx->coded_height) { avcodec_set_dimensions(s->avctx, 16*cols, 16*rows); if (s->avctx->extradata_size == 1) {