[vlc-devel] [PATCH] avcodec: only assume DXVA2 is used if it's forced

Rémi Denis-Courmont remi at remlab.net
Mon Mar 30 17:06:10 CEST 2015


Le lundi 30 mars 2015, 16:44:42 Steve Lhomme a écrit :
> Fixes #14054 regression in 2.2.0

> 
> --
> The DXVA2 decoder has a capability of 0, so it's only used when explicitly
> forced. ---
>  modules/codec/avcodec/video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
> index 366066c..07a3b4b 100644
> --- a/modules/codec/avcodec/video.c
> +++ b/modules/codec/avcodec/video.c
> @@ -403,7 +403,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext
> *p_context, * causes major image corruption. */
>  # if defined(_WIN32)
>      char *avcodec_hw = var_InheritString( p_dec, "avcodec-hw" );
> -    if( avcodec_hw == NULL || strcasecmp( avcodec_hw, "none" ) )
> +    if( avcodec_hw != NULL && !strcasecmp( avcodec_hw, "dxva2" ) )
>      {
>          msg_Warn( p_dec, "threaded frame decoding is not compatible with
> DXVA2, disabled" ); p_context->thread_type &= ~FF_THREAD_FRAME;

I am not going to repeat the objections made to bf9b9955 since that would not 
have been merged if anybody cared.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list