]> code.delx.au - pulseaudio/commitdiff
resampler: Revert to auto if the rates are equal and copy is chosen
authorpoljar (Damir Jelić) <poljarinho@gmail.com>
Wed, 11 Sep 2013 20:47:24 +0000 (22:47 +0200)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 25 Sep 2013 12:45:40 +0000 (18:15 +0530)
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.

src/pulsecore/resampler.c

index 4480823629ead72fa669e22d821957cdc63d03e2..46cf2ab6eb989e2c946194492e621552119768f3 100644 (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 */