command: show "no" for hwdec-current if hwdec failed

Now actually matches the documentation (was an empty string not null).
Fixes #11464.
This commit is contained in:
Dudemanguy 2023-08-09 20:39:36 -05:00
parent 692ccca3a2
commit 908dc79129
1 changed files with 1 additions and 1 deletions

View File

@ -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, &current);
if (!current)
if (!current || !current[0])
current = "no";
return m_property_strdup_ro(action, arg, current);
}