summaryrefslogtreecommitdiff
path: root/src/pulsecore/sink-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/sink-input.c')
-rw-r--r--src/pulsecore/sink-input.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index a5edd21c..aaabf5c3 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -374,6 +374,14 @@ int pa_sink_input_new(
pa_log_info("Rate changed to %u Hz", data->sink->sample_spec.rate);
}
+ if (pa_sink_input_new_data_is_passthrough(data) &&
+ !pa_sample_spec_equal(&data->sample_spec, &data->sink->sample_spec)) {
+ /* rate update failed, or other parts of sample spec didn't match */
+
+ pa_log_debug("Could not update sink sample spec to match passthrough stream");
+ return -PA_ERR_NOTSUPPORTED;
+ }
+
/* Due to the fixing of the sample spec the volume might not match anymore */
pa_cvolume_remap(&data->volume, &original_cm, &data->channel_map);