[FFmpeg-cvslog] h261dec: Fix context initialization sequence

Michael Niedermayer git at videolan.org
Sat Jan 17 23:54:53 CET 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 15 02:50:41 2014 +0200| [21683549edf436024cc3efbc4f8d1d55221c5336] | committer: Luca Barbato

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 at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 3bb465245fed6069512e6821000391beae8a6066)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21683549edf436024cc3efbc4f8d1d55221c5336
---

 libavcodec/h261dec.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index eefb5d3..39c1a32 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;



More information about the ffmpeg-cvslog mailing list