[vlc-commits] AVcodec: disable slice_thread + HW decoding in MPEG-2
Jean-Baptiste Kempf
git at videolan.org
Thu Jan 19 23:42:01 CET 2012
vlc/vlc-1.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jan 19 23:03:56 2012 +0100| [697250c775f118e361a076ff598f9dbd36c9f987] | committer: Jean-Baptiste Kempf
AVcodec: disable slice_thread + HW decoding in MPEG-2
Close #5867
(cherry picked from commit e3bb4aa98e55beee6811f5aada8968f602fcd9bc)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=697250c775f118e361a076ff598f9dbd36c9f987
---
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 b0c6a5b..40f1618 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -355,7 +355,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