mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
tagstruct: Allow NULL proplist with pa_tagstruct_get_proplist().
module-tunnel doesn't care about the proplist contents, so pa_tagstruct_get_proplist() is only used for removing the data from the tagstruct buffer. In that case it's more convenient to just pass NULL as the proplist argument.
This commit is contained in:
parent
e17f18d89a
commit
1edb4a470b
2 changed files with 8 additions and 24 deletions
|
|
@ -602,7 +602,6 @@ int pa_tagstruct_get_proplist(pa_tagstruct *t, pa_proplist *p) {
|
|||
size_t saved_rindex;
|
||||
|
||||
pa_assert(t);
|
||||
pa_assert(p);
|
||||
|
||||
if (t->rindex+1 > t->length)
|
||||
return -1;
|
||||
|
|
@ -624,6 +623,9 @@ int pa_tagstruct_get_proplist(pa_tagstruct *t, pa_proplist *p) {
|
|||
if (!k)
|
||||
break;
|
||||
|
||||
if (!pa_proplist_key_valid(k))
|
||||
goto fail;
|
||||
|
||||
if (pa_tagstruct_getu32(t, &length) < 0)
|
||||
goto fail;
|
||||
|
||||
|
|
@ -633,8 +635,8 @@ int pa_tagstruct_get_proplist(pa_tagstruct *t, pa_proplist *p) {
|
|||
if (pa_tagstruct_get_arbitrary(t, &d, length) < 0)
|
||||
goto fail;
|
||||
|
||||
if (pa_proplist_set(p, k, d, length) < 0)
|
||||
goto fail;
|
||||
if (p)
|
||||
pa_assert_se(pa_proplist_set(p, k, d, length) >= 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue