[vlc-devel] [PATCH 1/1] avcodec: hw accel with frame multithreading works since libavcodec 55.01.00

Rémi Denis-Courmont remi at remlab.net
Wed Mar 27 08:43:47 CET 2013


On Tue, 26 Mar 2013 20:25:00 +0100, Janne Grunau <janne-vlc at jannau.net>
wrote:
> diff --git a/modules/codec/avcodec/video.c
b/modules/codec/avcodec/video.c
> index 7697ef9..7bcae64 100644
> --- a/modules/codec/avcodec/video.c
> +++ b/modules/codec/avcodec/video.c
> @@ -342,7 +342,8 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext
> *p_context,
>           i_codec_id == AV_CODEC_ID_VC1 || i_codec_id ==
AV_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 &&
> +            LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 1, 0))

Why not use the preprocessor instead?

>          {
>              msg_Warn( p_dec, "threaded frame decoding is not compatible
>              with libavcodec-hw, disabled" );
>              p_sys->p_context->thread_type &= ~FF_THREAD_FRAME;

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list