[PATCH] resampler: Fix crash if 'auto' resampler chooses ffmpeg with variable rate

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

 



Hi Arun,

On Wed, Aug 22, 2012 at 4:01 PM, Arun Raghavan
<arun.raghavan at collabora.co.uk> wrote:
> On Wed, 2012-08-22 at 15:42 +0200, Fr?d?ric Dalleau wrote:
> [...]
>> diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
>> index 17f1783..8199bc4 100644
>> --- a/src/pulsecore/resampler.c
>> +++ b/src/pulsecore/resampler.c
>> @@ -237,7 +237,10 @@ pa_resampler* pa_resampler_new(
>>  #ifdef HAVE_SPEEX
>>          method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 3;
>>  #else
>> -        method = PA_RESAMPLER_FFMPEG;
>> +        if (flags & PA_RESAMPLER_VARIABLE_RATE)
>> +            method = PA_RESAMPLER_TRIVIAL;
>> +        else
>> +            method = PA_RESAMPLER_FFMPEG;
>>  #endif
>>      }
>
> The trivial resampler is not a good fallback. I'd rather make speex a
> mandatory dep again.

In this particular case, I think speex has been disabled for some project
specific reason. Personnaly, I would not bother more than simply fixing
the crash. Since there is a warning displayed, if it is critical to the project,
the user will enable speex again.

I'm surprised ffmpeg do not support variable rate, or is it only the pa
integration.

Regards,
Fr?d?ric


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

  Powered by Linux