[vlc-devel] [PATCH 1/3] transcode: don't use hardware decoder with --no-hw-dec

Steve Lhomme robux4 at ycbcr.xyz
Mon Jan 11 08:17:14 UTC 2021


It's still possible to use the hardware filters as the hw-dec option only
applies to decoding.
---
 modules/stream_out/transcode/video.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index dd3093a9692..adf989d22a5 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -73,6 +73,9 @@ static const struct encoder_owner_callbacks encoder_video_transcode_cbs = {
 
 static vlc_decoder_device * video_get_decoder_device( decoder_t *p_dec )
 {
+    if( !var_InheritBool( p_dec, "hw-dec" ) )
+        return NULL;
+
     struct decoder_owner *p_owner = dec_get_owner( p_dec );
     return TranscodeHoldDecoderDevice(&p_dec->obj, p_owner->id);
 }
-- 
2.29.2



More information about the vlc-devel mailing list