summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-09-14 08:32:40 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-09-14 13:55:58 +0530
commitec4f2564931ec732f634ce892a360b1c195133fa (patch)
tree1b156393dbc313a008b4a115e88f8b44986aa600
parent3cae4a0606aa74a485a57b1bbbd7be7726b9a9c6 (diff)
stream: Relax assert for extended API
For some reason this assert wasn't triggered earlier -- we shouldn't be looking at the stream sample_spec if the formats API is used.
-rw-r--r--src/pulse/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index e7e3211b..ec88bf13 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -1213,7 +1213,7 @@ static int create_stream(
PA_CHECK_VALIDITY(s->context, direction == PA_STREAM_PLAYBACK || !(flags & (PA_STREAM_START_MUTED)), PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, direction == PA_STREAM_RECORD || !(flags & (PA_STREAM_PEAK_DETECT)), PA_ERR_INVALID);
- PA_CHECK_VALIDITY(s->context, !volume || (pa_sample_spec_valid(&s->sample_spec) && volume->channels == s->sample_spec.channels), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, !volume || s->n_formats || (pa_sample_spec_valid(&s->sample_spec) && volume->channels == s->sample_spec.channels), PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, !sync_stream || (direction == PA_STREAM_PLAYBACK && sync_stream->direction == PA_STREAM_PLAYBACK), PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, (flags & (PA_STREAM_ADJUST_LATENCY|PA_STREAM_EARLY_REQUESTS)) != (PA_STREAM_ADJUST_LATENCY|PA_STREAM_EARLY_REQUESTS), PA_ERR_INVALID);