[FFmpeg-cvslog] h264dec: do not call finish_setup() if we have not started a frame

Anton Khirnov git at videolan.org
Tue Jan 31 18:25:48 EET 2017


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jul 20 09:41:35 2016 +0200| [e344e65109f1a75ca82aff4cecec44e79197753c] | committer: Anton Khirnov

h264dec: do not call finish_setup() if we have not started a frame

Found-By: Jan Ruge <jan.s.ruge at gmail.com>
Bug-Id: 952

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

 libavcodec/h264dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 4d1702e..0e318a5 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -557,7 +557,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
                 break;
 
             if (avctx->active_thread_type & FF_THREAD_FRAME && !h->avctx->hwaccel &&
-                i >= nals_needed && !h->setup_finished) {
+                i >= nals_needed && !h->setup_finished && h->cur_pic_ptr) {
                 ff_thread_finish_setup(avctx);
                 h->setup_finished = 1;
             }



More information about the ffmpeg-cvslog mailing list