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

rong deng dzrongg at gmail.com
Fri Aug 24 09:55:56 PDT 2012


2012/8/24 Tanu Kaskinen <tanuk at iki.fi>:
> On Wed, 2012-08-22 at 19:31 +0530, Arun Raghavan 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.
>
> Whether or not the trivial resampler is a good fallback depends on the
> use case. If someone thinks that it's a good idea to compile pulseaudio
> without speex support, then I would expect him to be fine with the
> trivial resampler (otherwise he wouldn't have disabled speex support).
>

Besides, I once profiled and it showed the trivial resampler is much
faster, esp on resource limited embedded boards. Hmm, the output sound
is not so much bad...


More information about the pulseaudio-discuss mailing list