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>
(cherry picked from commit 3bb465245f)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Michael Niedermayer 2014-08-15 02:50:41 +02:00 committed by Luca Barbato
parent cbfdbba58e
commit 21683549ed
1 changed files with 1 additions and 2 deletions

View 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;