h261dec: Fix context initialization sequence
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 15 Aug 2014 00:50:41 +0000 (02:50 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 18 Dec 2014 21:10:24 +0000 (23:10 +0200)
ff_mpv_common_init sets s->context_initialized.

This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/h261dec.c

index 4d1c997..83cee7f 100644 (file)
@@ -600,11 +600,10 @@ retry:
         s->parse_context = pc;
     }
 
-    if (!s->context_initialized)
+    if (!s->context_initialized) {
         if ((ret = ff_mpv_common_init(s)) < 0)
             return ret;
 
-    if (!s->context_initialized) {
         ret = ff_set_dimensions(avctx, s->width, s->height);
         if (ret < 0)
             return ret;