[FFmpeg-devel] [PATCH] convert to S16 when resampling is requested

Baptiste Coudurier baptiste.coudurier
Mon Feb 9 02:15:14 CET 2009


Michael Niedermayer wrote:
> [...]
>
>>
>> 3rd try.
> [...]
>> @@ -126,8 +132,10 @@
>>      }
>>  }
>>  
>> -ReSampleContext *audio_resample_init(int output_channels, int input_channels,
>> -                                      int output_rate, int input_rate)
>> +ReSampleContext *audio_resample_init2(int output_channels, int input_channels,
> 
> this needs a ff or av prefix
> also there should be a way for the user to set/pass the other params
> to the resampler namely 
> int filter_size, int phase_shift, int linear, double cutoff
> when we already change the API ...

Good idea, updated.

> [...]
>> +            av_log(NULL, AV_LOG_ERROR,
>> +                   "Cannot convert %s sample format to s16 sample format\n",
>> +                   avcodec_get_sample_fmt_name(s->sample_fmt[0]));
> 
> av_log() should have some context different from NULL otherwise
> it may become hard in some cases to tell from where a message came
> 

Ok, separate patch attached, which can be applied first.

> 
>> @@ -2443,6 +2443,10 @@
>>  
>>  ReSampleContext *audio_resample_init(int output_channels, int input_channels,
>>                                       int output_rate, int input_rate);
> 
> should be derpecated and under #if VERSION < blah

Done.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resample_s16_3.patch
Type: text/x-diff
Size: 11131 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090208/9bd9756c/attachment.patch>



More information about the ffmpeg-devel mailing list