/**
- * @file vp5.c
+ * @file libavcodec/vp5.c
* VP5 compatible video decoder
*
* Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
#include "avcodec.h"
#include "dsputil.h"
-#include "bitstream.h"
+#include "get_bits.h"
#include "vp56.h"
#include "vp56data.h"
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;
}
- }
+ } else if (!s->macroblocks)
+ return 0;
return 1;
}