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

Steve Lhomme robUx4 at videolabs.io
Mon Mar 30 16:44:42 CEST 2015


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;
-- 
2.3.2




More information about the vlc-devel mailing list