[vlc-devel] [PATCH 2/2] qsv: avoid displaying NULL

Alexandre Janniaux ajanni at videolabs.io
Wed Feb 10 09:46:56 UTC 2021


---
 modules/codec/qsv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index 45e9add4ca..0abdcf4c9c 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -504,7 +504,8 @@ static int Open(vlc_object_t *this)
     param_out.mfx.CodecId = sys->params.mfx.CodecId;
 
     char *psz_rc = var_InheritString(enc, SOUT_CFG_PREFIX "rc-method");
-    msg_Dbg(enc, "Encoder using '%s' Rate Control method", psz_rc );
+    msg_Dbg(enc, "Encoder using '%s' Rate Control method",
+            psz_rc ? psz_rc : rc_method_text[0]);
     sys->params.mfx.RateControlMethod = qsv_params_get_value(rc_method_text,
         rc_method_list, ARRAY_SIZE(rc_method_list), psz_rc );
 
-- 
2.30.1



More information about the vlc-devel mailing list