[vlc-commits] qsv: avoid displaying NULL

Alexandre Janniaux git at videolan.org
Mon Feb 15 15:06:00 UTC 2021


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Feb 10 10:45:44 2021 +0100| [57994187013fb362f7dcf5a5a2bd32177410df36] | committer: Alexandre Janniaux

qsv: avoid displaying NULL

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57994187013fb362f7dcf5a5a2bd32177410df36
---

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



More information about the vlc-commits mailing list