From 3bb465245fed6069512e6821000391beae8a6066 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 Aug 2014 02:50:41 +0200 Subject: h261dec: Fix context initialization sequence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavcodec/h261dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/h261dec.c') diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 4d1c997544..83cee7f30c 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -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; -- cgit v1.2.3