mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
passthrough: We must not plug in a resampler on stream move
This commit is contained in:
parent
3c854fc00c
commit
b08237b6c6
2 changed files with 8 additions and 6 deletions
|
|
@ -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 */
|
/* Try to reuse the old resampler if possible */
|
||||||
new_resampler = i->thread_info.resampler;
|
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_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 */
|
/* Okay, we need a new resampler for the new sink */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 */
|
/* Try to reuse the old resampler if possible */
|
||||||
new_resampler = o->thread_info.resampler;
|
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_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 */
|
/* Okay, we need a new resampler for the new source */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue