[FFmpeg-cvslog] r16140 - in trunk/libavcodec: vp5.c vp56.c vp6.c

aurel subversion
Mon Dec 15 01:00:16 CET 2008


Author: aurel
Date: Mon Dec 15 01:00:16 2008
New Revision: 16140

Log:
vp56: don't reset dimensions to 0 in codec init

Modified:
   trunk/libavcodec/vp5.c
   trunk/libavcodec/vp56.c
   trunk/libavcodec/vp6.c

Modified: trunk/libavcodec/vp5.c
==============================================================================
--- trunk/libavcodec/vp5.c	(original)
+++ trunk/libavcodec/vp5.c	Mon Dec 15 01:00:16 2008
@@ -58,7 +58,8 @@ static int vp5_parse_header(VP56Context 
         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;

Modified: trunk/libavcodec/vp56.c
==============================================================================
--- trunk/libavcodec/vp56.c	(original)
+++ trunk/libavcodec/vp56.c	Mon Dec 15 01:00:16 2008
@@ -657,8 +657,6 @@ av_cold void vp56_init(AVCodecContext *a
     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];

Modified: trunk/libavcodec/vp6.c
==============================================================================
--- trunk/libavcodec/vp6.c	(original)
+++ trunk/libavcodec/vp6.c	Mon Dec 15 01:00:16 2008
@@ -75,7 +75,8 @@ static int vp6_parse_header(VP56Context 
         /* 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) {




More information about the ffmpeg-cvslog mailing list