mix: pa_mix() is always called with more than one steam
authorPeter Meerwald <pmeerw@pmeerw.net>
Sun, 2 Nov 2014 16:22:19 +0000 (17:22 +0100)
committerPeter Meerwald <pmeerw@pmeerw.net>
Sun, 9 Nov 2014 21:39:03 +0000 (22:39 +0100)
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
src/pulsecore/mix.c

index 4a839ec24e8f7269c36654129132e882bd0bbc74..861f76b7832b4b2510e9a33e153729662684c53c 100644 (file)
@@ -630,11 +630,12 @@ size_t pa_mix(
     pa_assert(data);
     pa_assert(length);
     pa_assert(spec);
+    pa_assert(nstreams > 1);
 
     if (!volume)
         volume = pa_cvolume_reset(&full_volume, spec->channels);
 
-    if (mute || pa_cvolume_is_muted(volume) || nstreams <= 0) {
+    if (mute || pa_cvolume_is_muted(volume)) {
         pa_silence_memory(data, length, spec);
         return length;
     }