[vlc-commits] Set decoder_t::i_extra_picture_buffers in avcodec decoder.

Laurent Aimar git at videolan.org
Tue Jan 10 22:57:31 CET 2012


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jan 10 22:55:29 2012 +0100| [5539fea75b47b3c8c68c2f5e8a268904f4c019ff] | committer: Laurent Aimar

Set decoder_t::i_extra_picture_buffers in avcodec decoder.

It should fix #5753.
There can still be an issue with an insufficient input caching.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5539fea75b47b3c8c68c2f5e8a268904f4c019ff
---

 modules/codec/avcodec/video.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 95e64b5..c422e8e 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -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;



More information about the vlc-commits mailing list