mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
tagstruct: Distinguish pa_tagstruct_new() use cases
pa_tagstruct_new() is called either with no data, i.e. (NULL, 0) to create a dynamic tagstruct or with a pointer to fixed data introduce a new function pa_tagstruct_new_fixed() for the latter case Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
parent
7c223a6565
commit
037fdf485f
11 changed files with 70 additions and 57 deletions
|
|
@ -369,7 +369,7 @@ static void handle_srbchannel_memblock(pa_context *c, pa_memblock *memblock) {
|
|||
}
|
||||
|
||||
/* Ack the enable command */
|
||||
t = pa_tagstruct_new(NULL, 0);
|
||||
t = pa_tagstruct_new();
|
||||
pa_tagstruct_putu32(t, PA_COMMAND_ENABLE_SRBCHANNEL);
|
||||
pa_tagstruct_putu32(t, c->srb_setup_tag);
|
||||
pa_pstream_send_tagstruct(c->pstream, t);
|
||||
|
|
@ -1305,7 +1305,7 @@ pa_tagstruct *pa_tagstruct_command(pa_context *c, uint32_t command, uint32_t *ta
|
|||
pa_assert(c);
|
||||
pa_assert(tag);
|
||||
|
||||
t = pa_tagstruct_new(NULL, 0);
|
||||
t = pa_tagstruct_new();
|
||||
pa_tagstruct_putu32(t, command);
|
||||
pa_tagstruct_putu32(t, *tag = c->ctag++);
|
||||
|
||||
|
|
@ -1479,7 +1479,7 @@ static void pa_command_disable_srbchannel(pa_pdispatch *pd, uint32_t command, ui
|
|||
}
|
||||
|
||||
/* Send disable command back again */
|
||||
t2 = pa_tagstruct_new(NULL, 0);
|
||||
t2 = pa_tagstruct_new();
|
||||
pa_tagstruct_putu32(t2, PA_COMMAND_DISABLE_SRBCHANNEL);
|
||||
pa_tagstruct_putu32(t2, tag);
|
||||
pa_pstream_send_tagstruct(c->pstream, t2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue