]> git.sesse.net Git - vlc/commitdiff
Set decoder_t::i_extra_picture_buffers in avcodec decoder.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 10 Jan 2012 21:55:29 +0000 (22:55 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 10 Jan 2012 21:55:29 +0000 (22:55 +0100)
It should fix #5753.
There can still be an issue with an insufficient input caching.

modules/codec/avcodec/video.c

index 95e64b5d36ad59662f4c7c94fafd276cbd260c7a..c422e8ea8467a8bb605f1ec0704db87da7edfd0c 100644 (file)
@@ -367,6 +367,11 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
         p_sys->p_context->get_format = ffmpeg_GetFormat;
     }
 #endif
+#ifdef HAVE_AVCODEC_MT
+    if( p_sys->p_context->thread_type & FF_THREAD_FRAME )
+        p_dec->i_extra_picture_buffers = 2 * p_sys->p_context->thread_count;
+#endif
+
 
     /* ***** misc init ***** */
     p_sys->i_pts = VLC_TS_INVALID;