[vlc-devel] [PATCH] avcodec: reduce the amount of extra decoding buffers when using multithread

Steve Lhomme robux4 at videolabs.io
Sat Jan 30 09:26:36 CET 2016


From: Steve Lhomme <robUx4 at gmail.com>

---
 modules/codec/avcodec/video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 6b23375..8980241 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -451,7 +451,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     }
 
     if( p_context->thread_type & FF_THREAD_FRAME )
-        p_dec->i_extra_picture_buffers = 2 * p_context->thread_count;
+        p_dec->i_extra_picture_buffers = p_context->thread_count - 1;
 #endif
 
     /* ***** misc init ***** */
-- 
2.6.0.windows.1



More information about the vlc-devel mailing list