[vlc-commits] AVcodec: disable slice_thread + HW decoding in MPEG-2

Jean-Baptiste Kempf git at videolan.org
Thu Jan 19 23:09:42 CET 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jan 19 23:03:56 2012 +0100| [e3bb4aa98e55beee6811f5aada8968f602fcd9bc] | committer: Jean-Baptiste Kempf

AVcodec: disable slice_thread + HW decoding in MPEG-2

Close #5867

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

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

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index b30e036..94257d4 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -363,7 +363,10 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
          i_codec_id == CODEC_ID_VC1 || i_codec_id == CODEC_ID_WMV3) )
     {
 #ifdef HAVE_AVCODEC_MT
-        if( p_sys->p_context->thread_type & FF_THREAD_FRAME )
+        if( ( p_sys->p_context->thread_type & FF_THREAD_FRAME ) ||
+            ( ( p_sys->p_context->thread_type & FF_THREAD_SLICE ) &&
+              ( i_codec_id == CODEC_ID_MPEG1VIDEO || i_codec_id == CODEC_ID_MPEG2VIDEO ) )
+          )
         {
             msg_Warn( p_dec, "threaded frame decoding is not compatible with ffmpeg-hw, disabled" );
             p_sys->p_context->thread_type &= ~FF_THREAD_FRAME;



More information about the vlc-commits mailing list