resampler: Revert to auto if the rates are equal and copy is chosen

This patch fixes a small mistake where we actually log that we are
reverting to the auto resampler if we can't use the 'copy' resampler but
never do the revert.

This would lead to a crash if the user chooses the 'copy' resampler and
then tries to play something that needs to be resampled.
This commit is contained in:
poljar (Damir Jelić) 2013-09-11 22:47:24 +02:00 committed by Arun Raghavan
parent a89ca82e68
commit 6f94c56782

View file

@ -214,6 +214,7 @@ static pa_resample_method_t pa_resampler_fix_method(
case PA_RESAMPLER_COPY:
if (rate_a != rate_b) {
pa_log_info("Resampler 'copy' cannot change sampling rate, reverting to resampler 'auto'.");
method = PA_RESAMPLER_AUTO;
break;
}
/* Else fall through */