From 908dc791299672042b0fc24de64b57f88bba313c Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 9 Aug 2023 20:39:36 -0500 Subject: [PATCH] command: show "no" for hwdec-current if hwdec failed Now actually matches the documentation (was an empty string not null). Fixes #11464. --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/command.c b/player/command.c index afacfdea9d..ae12748378 100644 --- a/player/command.c +++ b/player/command.c @@ -2137,7 +2137,7 @@ static int mp_property_hwdec_current(void *ctx, struct m_property *prop, char *current = NULL; mp_decoder_wrapper_control(dec, VDCTRL_GET_HWDEC, ¤t); - if (!current) + if (!current || !current[0]) current = "no"; return m_property_strdup_ro(action, arg, current); }