diff options
Diffstat (limited to 'libavcodec/vp5.c')
-rw-r--r-- | libavcodec/vp5.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c index 7b39c81cb4..e47db0d2c1 100644 --- a/libavcodec/vp5.c +++ b/libavcodec/vp5.c @@ -58,7 +58,8 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size, 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; |