summaryrefslogtreecommitdiff
path: root/libavcodec/vp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/vp6.c')
-rw-r--r--libavcodec/vp6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index d8fc0efb3a..6ffde072f7 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -75,7 +75,8 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
/* 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) {