mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
fix sample uploading
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@788 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
e1ac42dd10
commit
9b52ac4b47
1 changed files with 2 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ int pa_stream_connect_upload(pa_stream *s, size_t length) {
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
||||||
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
|
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
|
||||||
PA_CHECK_VALIDITY(s->context, length <= 0, PA_ERR_INVALID);
|
PA_CHECK_VALIDITY(s->context, length > 0, PA_ERR_INVALID);
|
||||||
|
|
||||||
pa_stream_ref(s);
|
pa_stream_ref(s);
|
||||||
|
|
||||||
|
|
@ -50,6 +50,7 @@ int pa_stream_connect_upload(pa_stream *s, size_t length) {
|
||||||
t = pa_tagstruct_command(s->context, PA_COMMAND_CREATE_UPLOAD_STREAM, &tag);
|
t = pa_tagstruct_command(s->context, PA_COMMAND_CREATE_UPLOAD_STREAM, &tag);
|
||||||
pa_tagstruct_puts(t, s->name);
|
pa_tagstruct_puts(t, s->name);
|
||||||
pa_tagstruct_put_sample_spec(t, &s->sample_spec);
|
pa_tagstruct_put_sample_spec(t, &s->sample_spec);
|
||||||
|
pa_tagstruct_put_channel_map(t, &s->channel_map);
|
||||||
pa_tagstruct_putu32(t, length);
|
pa_tagstruct_putu32(t, length);
|
||||||
pa_pstream_send_tagstruct(s->context->pstream, t);
|
pa_pstream_send_tagstruct(s->context->pstream, t);
|
||||||
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_create_stream_callback, s);
|
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_create_stream_callback, s);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue