[vlc-commits] avcodec: allow frame threading with hardware acceleration
Rémi Denis-Courmont
git at videolan.org
Thu Jul 18 18:36:35 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 17 23:25:42 2013 +0300| [9419612ae5dff609ab323fb79a9a8c18496ad77e] | committer: Rémi Denis-Courmont
avcodec: allow frame threading with hardware acceleration
Only MPEG1/2 slice threading is currently known as broken.
This rectifies commit df252eac618091d156cf986f38a98c2bddbc8437.
(cherry picked from commit 9b28b4c6679a52169d809803beadf0e89a81665b)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=9419612ae5dff609ab323fb79a9a8c18496ad77e
---
modules/codec/avcodec/video.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 7f5b8ab..07c785e 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -344,12 +344,14 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
i_codec_id == AV_CODEC_ID_H264 ||
i_codec_id == AV_CODEC_ID_VC1 || i_codec_id == AV_CODEC_ID_WMV3) )
{
-#if defined(HAVE_AVCODEC_MT) //&& LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 1, 0)
+#if defined(HAVE_AVCODEC_MT)
+# if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 1, 0))
if( p_sys->p_context->thread_type & FF_THREAD_FRAME )
{
msg_Warn( p_dec, "threaded frame decoding is not compatible with avcodec-hw, disabled" );
p_sys->p_context->thread_type &= ~FF_THREAD_FRAME;
}
+# endif
if( ( p_sys->p_context->thread_type & FF_THREAD_SLICE ) &&
( i_codec_id == AV_CODEC_ID_MPEG1VIDEO || i_codec_id == AV_CODEC_ID_MPEG2VIDEO ) )
{
More information about the vlc-commits
mailing list