diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-10-02 01:15:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-10-02 01:15:58 +0200 |
commit | 08cf9db0d17f8e2cfc68976fd96f0374721cdf22 (patch) | |
tree | ea4b2f3e2e90e5ae4a973d73b981736f7f200a79 /src | |
parent | 54afcf25980662d3033328705ec481c62b223e56 (diff) |
properly parse response to pa_stream_set_buffer_attr() calls. closes #370
Diffstat (limited to 'src')
-rw-r--r-- | src/pulse/stream.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/pulse/stream.c b/src/pulse/stream.c index ababe176..00aa1cf9 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -2010,7 +2010,6 @@ static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command, success = 0; } else { - if (o->stream->direction == PA_STREAM_PLAYBACK) { if (pa_tagstruct_getu32(t, &o->stream->buffer_attr.maxlength) < 0 || pa_tagstruct_getu32(t, &o->stream->buffer_attr.tlength) < 0 || @@ -2027,6 +2026,20 @@ static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command, } } + if (o->stream->context->version >= 13) { + pa_usec_t usec; + + if (pa_tagstruct_get_usec(t, &usec) < 0) { + pa_context_fail(o->context, PA_ERR_PROTOCOL); + goto finish; + } + + if (o->stream->direction == PA_STREAM_RECORD) + o->stream->timing_info.configured_source_usec = usec; + else + o->stream->timing_info.configured_sink_usec = usec; + } + if (!pa_tagstruct_eof(t)) { pa_context_fail(o->context, PA_ERR_PROTOCOL); goto finish; |