adapter: return an error when we can't find a format

This commit is contained in:
Wim Taymans 2020-05-20 15:15:35 +02:00
parent d31c057b42
commit 963b00b77b

View file

@ -173,7 +173,7 @@ static int find_format(struct pw_impl_node *node, enum pw_direction direction,
SPA_PARAM_EnumFormat, &state, SPA_PARAM_EnumFormat, &state,
NULL, &format, &b)) != 1) { NULL, &format, &b)) != 1) {
pw_log_warn(NAME " %p: can't get format: %s", node, spa_strerror(res)); pw_log_warn(NAME " %p: can't get format: %s", node, spa_strerror(res));
return res; return res < 0 ? res : -ENOENT;
} }
if ((res = spa_format_parse(format, media_type, media_subtype)) < 0) if ((res = spa_format_parse(format, media_type, media_subtype)) < 0)