mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
format: Fix channel map handling
Channel map handling in the extended API was broken. Thanks for Milos_SD for pointing this out on IRC.
This commit is contained in:
parent
f4eccad1e6
commit
117c714594
2 changed files with 9 additions and 7 deletions
|
|
@ -193,11 +193,9 @@ pa_bool_t pa_format_info_to_sample_spec(pa_format_info *f, pa_sample_spec *ss, p
|
|||
if (map) {
|
||||
pa_channel_map_init(map);
|
||||
|
||||
if (!pa_format_info_get_prop_string(f, PA_PROP_FORMAT_CHANNEL_MAP, &m))
|
||||
goto out;
|
||||
|
||||
if (m && pa_channel_map_parse(map, m) == NULL)
|
||||
goto out;
|
||||
if (pa_format_info_get_prop_string(f, PA_PROP_FORMAT_CHANNEL_MAP, &m))
|
||||
if (pa_channel_map_parse(map, m) == NULL)
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = TRUE;
|
||||
|
|
@ -281,7 +279,10 @@ pa_bool_t pa_format_info_get_prop_string(pa_format_info *f, const char *key, cha
|
|||
pa_assert(key);
|
||||
pa_assert(v);
|
||||
|
||||
pa_return_val_if_fail(str = pa_proplist_gets(f->plist, key), FALSE);
|
||||
str = pa_proplist_gets(f->plist, key), FALSE;
|
||||
if (!str)
|
||||
return FALSE;
|
||||
|
||||
o = json_tokener_parse(str);
|
||||
pa_return_val_if_fail(!is_error(o), FALSE);
|
||||
if (json_object_get_type(o) != json_type_string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue