avcodec/cfhd: Set dimensions unconditionally
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 10 Jun 2016 18:22:02 +0000 (20:22 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 10 Jun 2016 20:05:38 +0000 (22:05 +0200)
Fixes Ticket5215

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cfhd.c

index 0e6abe0..74facd4 100644 (file)
@@ -438,6 +438,11 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
                     return ret;
                 }
             }
+            ret = ff_set_dimensions(avctx, s->coded_width, s->coded_height);
+            if (ret < 0)
+                return ret;
+            frame.f->width =
+            frame.f->height = 0;
 
             if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
                 return ret;