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

Laurent Aimar git at videolan.org
Wed Jan 11 16:13:44 CET 2012


vlc/vlc-1.2 | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jan 10 22:55:29 2012 +0100| [ab36432e2d5d1093169554df58441efd96aea214] | committer: Jean-Baptiste Kempf

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.
(cherry picked from commit 5539fea75b47b3c8c68c2f5e8a268904f4c019ff)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 6c9b865..22031b1 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -359,6 +359,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