[FFmpeg-devel] [PATCH] lavfi/earwax: remove config_input()

Paul B Mahol onemda at gmail.com
Thu Jan 24 11:20:56 CET 2013


On 1/24/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Wednesday 2013-01-23 19:23:07 +0000, Paul B Mahol encoded:
>> This is wrong function to check for input parameters.
>> Function is not needed because query_formats() already
>> sets supported sample rates.
>>
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>>  libavfilter/af_earwax.c | 12 ------------
>>  1 file changed, 12 deletions(-)
>>
>> diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c
>> index eaf6b05..a169d2a 100644
>> --- a/libavfilter/af_earwax.c
>> +++ b/libavfilter/af_earwax.c
>> @@ -91,17 +91,6 @@ static int query_formats(AVFilterContext *ctx)
>>      return 0;
>>  }
>>
>> -static int config_input(AVFilterLink *inlink)
>> -{
>> -    if (inlink->sample_rate != 44100) {
>> -        av_log(inlink->dst, AV_LOG_ERROR,
>> -               "The earwax filter only works for 44.1kHz audio. Insert "
>> -               "a resample filter before this\n");
>> -        return AVERROR(EINVAL);
>> -    }
>> -    return 0;
>> -}
>> -
>>  //FIXME: replace with DSPContext.scalarproduct_int16
>>  static inline int16_t *scalarproduct(const int16_t *in, const int16_t
>> *endin, int16_t *out)
>>  {
>> @@ -158,7 +147,6 @@ static const AVFilterPad earwax_inputs[] = {
>>          .name         = "default",
>>          .type         = AVMEDIA_TYPE_AUDIO,
>>          .filter_frame = filter_frame,
>> -        .config_props = config_input,
>>          .min_perms    = AV_PERM_READ,
>>      },
>>      { NULL }
>
> Looks OK if tested, thanks.

Yes, I tested it, unlike others.

> --
> FFmpeg = Formidable & Faithless Mystic Proud Enigmatic Gem
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list