[FFmpeg-devel] [PATCH] lavfi/crop: add support for x/y commands
Stefano Sabatini
stefasab at gmail.com
Sun Jul 14 11:20:58 CEST 2013
On date Wednesday 2013-07-10 17:51:08 +0200, Stefano Sabatini encoded:
> TODO: bump micro
> ---
> doc/filters.texi | 14 ++++++++++++++
> libavfilter/vf_crop.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 67 insertions(+)
Ping.
[...]
> +static int set_expr(AVExpr **pexpr_ptr, char **expr_ptr,
> + const char *expr, const char *option, void *log_ctx)
> +{
> + int ret;
> + AVExpr *new_pexpr;
> + char *new_expr;
> +
> + new_expr = av_strdup(expr);
> + if (!new_expr)
> + return AVERROR(ENOMEM);
> + ret = av_expr_parse(&new_pexpr, expr, var_names,
> + NULL, NULL, NULL, NULL, 0, log_ctx);
> + if (ret < 0) {
> + av_log(log_ctx, AV_LOG_ERROR,
> + "Error when evaluating the expression '%s' for %s\n",
> + expr, option);
> + av_free(new_expr);
> + return ret;
> + }
> +
> + if (*pexpr_ptr)
> + av_expr_free(*pexpr_ptr);
> + *pexpr_ptr = new_pexpr;
> + av_freep(expr_ptr);
> + *expr_ptr = new_expr;
> +
> + return 0;
> +}
This could be moved to internals and factorized but I'm not sure about
the best way to do it.
--
FFmpeg = Fierce & Faithless Majestic Portable Emblematic Guru
More information about the ffmpeg-devel
mailing list