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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 4480823..46cf2ab 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -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 */
-- 
1.8.4



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux