On Sat, Sep 29, 2012 at 01:17:29AM -0400, Justin Ruggles wrote:
> --- /dev/null
> +++ b/libavfilter/af_volume.c
> @@ -0,0 +1,306 @@
> +
> +static av_cold int init(AVFilterContext *ctx, const char *args)
> +{
> +    VolumeContext *vol = ctx->priv;
> +    int ret;
> +
> +    vol->class = &volume_class;
> +    av_opt_set_defaults(vol);
> +
> +    if ((ret = av_set_options_string(vol, args, "=", ":")) < 0) {
> +        av_log(ctx, AV_LOG_ERROR, "Error parsing options string '%s'.\n", 
> args);
> +        return ret;
> +    }
> +
> +    if (vol->precision == PRECISION_FIXED) {
> +        vol->volume_i = (int)(vol->volume * 256 + 0.5);
> +        vol->volume   = vol->volume_i / 256.0;
> +        av_log(ctx, AV_LOG_VERBOSE, "volume:(%d/256)(%f)(%1.2fdB) 
> precision:fixed\n",
> +               vol->volume_i, vol->volume, 20.0*log(vol->volume)/M_LN10);
> +    } else {
> +        av_log(ctx, AV_LOG_VERBOSE, "volume:(%f)(%1.2fdB) precision:%s\n",
> +               vol->volume, 20.0*log(vol->volume)/M_LN10,
> +               precision_str[vol->precision]);
> +    }
> +
> +init_end:
> +    av_opt_free(vol);
> +    return ret;
> +}

There is no goto in the function, so I wonder what the label is for ...

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to