passthrough: We must not plug in a resampler on stream move

This commit is contained in:
Arun Raghavan 2011-08-18 12:35:23 +05:30
parent 3c854fc00c
commit b08237b6c6
2 changed files with 8 additions and 6 deletions

View file

@ -1608,9 +1608,10 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, pa_bool_t save) {
/* Try to reuse the old resampler if possible */
new_resampler = i->thread_info.resampler;
else if ((i->flags & PA_SINK_INPUT_VARIABLE_RATE) ||
else if (!pa_sink_input_is_passthrough(i) &&
((i->flags & PA_SINK_INPUT_VARIABLE_RATE) ||
!pa_sample_spec_equal(&i->sample_spec, &dest->sample_spec) ||
!pa_channel_map_equal(&i->channel_map, &dest->channel_map)) {
!pa_channel_map_equal(&i->channel_map, &dest->channel_map))) {
/* Okay, we need a new resampler for the new sink */

View file

@ -1376,9 +1376,10 @@ int pa_source_output_finish_move(pa_source_output *o, pa_source *dest, pa_bool_t
/* Try to reuse the old resampler if possible */
new_resampler = o->thread_info.resampler;
else if ((o->flags & PA_SOURCE_OUTPUT_VARIABLE_RATE) ||
else if (!pa_source_output_is_passthrough(o) &&
((o->flags & PA_SOURCE_OUTPUT_VARIABLE_RATE) ||
!pa_sample_spec_equal(&o->sample_spec, &dest->sample_spec) ||
!pa_channel_map_equal(&o->channel_map, &dest->channel_map)) {
!pa_channel_map_equal(&o->channel_map, &dest->channel_map))) {
/* Okay, we need a new resampler for the new source */