[FFmpeg-devel] [PATCH] lavfi/aevalsrc: remove limitation on the number of channels

Michael Niedermayer michaelni at gmx.at
Thu May 17 13:35:39 CEST 2012


On Thu, May 17, 2012 at 01:03:45PM +0200, Stefano Sabatini wrote:
> ---
>  libavfilter/asrc_aevalsrc.c |    8 +-------
>  1 files changed, 1 insertions(+), 7 deletions(-)
> 
> diff --git a/libavfilter/asrc_aevalsrc.c b/libavfilter/asrc_aevalsrc.c
> index 6c9022b..41ccda9 100644
> --- a/libavfilter/asrc_aevalsrc.c
> +++ b/libavfilter/asrc_aevalsrc.c
> @@ -100,12 +100,6 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
>      buf = args1;
>      i = 0;
>      while (expr = av_strtok(buf, ":", &bufptr)) {
> -        if (i >= 8) {
> -            av_log(ctx, AV_LOG_ERROR,
> -                   "More than 8 expressions provided, unsupported.\n");
> -            ret = AVERROR(EINVAL);
> -            return ret;
> -        }
>          ret = av_expr_parse(&eval->expr[i], expr, var_names,
>                              NULL, NULL, NULL, NULL, 0, ctx);
>          if (ret < 0)
> @@ -214,7 +208,7 @@ static int request_frame(AVFilterLink *outlink)
>          eval->var_values[VAR_T] = eval->var_values[VAR_N] * (double)1/eval->sample_rate;
>  
>          for (j = 0; j < eval->nb_channels; j++) {
> -            *((double *) samplesref->data[j] + i) =
> +            *((double *) samplesref->extended_data[j] + i) =
>                  av_expr_eval(eval->expr[j], eval->var_values, NULL);
>          }
>      }

LGTM

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120517/34f83dfa/attachment.asc>


More information about the ffmpeg-devel mailing list