summaryrefslogtreecommitdiff
path: root/libavcodec/h261dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-15 02:50:41 +0200
committerMartin Storsjö <martin@martin.st>2014-12-18 23:10:24 +0200
commit3bb465245fed6069512e6821000391beae8a6066 (patch)
tree00158bc8ac888ddb37dbbc4f702290f0fd62e258 /libavcodec/h261dec.c
parent91bfac759dfd536e439ad3e35964705012c6a5a7 (diff)
h261dec: Fix context initialization sequence
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>
Diffstat (limited to 'libavcodec/h261dec.c')
-rw-r--r--libavcodec/h261dec.c3
1 files changed, 1 insertions, 2 deletions
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;