adapter: improve error message

Make sure we debug the result code that is returned.
This commit is contained in:
Wim Taymans 2021-02-26 20:45:25 +01:00
parent e2181c582d
commit 80a543e043

View file

@ -185,8 +185,9 @@ static int find_format(struct pw_impl_node *node, enum pw_direction direction,
SPA_DIRECTION_OUTPUT, 0, SPA_DIRECTION_OUTPUT, 0,
SPA_PARAM_EnumFormat, &state, SPA_PARAM_EnumFormat, &state,
NULL, &format, &b)) != 1) { NULL, &format, &b)) != 1) {
res = res < 0 ? res : -ENOENT;
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 < 0 ? res : -ENOENT; return res;
} }
if ((res = spa_format_parse(format, media_type, media_subtype)) < 0) if ((res = spa_format_parse(format, media_type, media_subtype)) < 0)