[FFmpeg-devel] [PATCH] Configure graph filters with more than one output
Vitor Sessak
vitor1001
Sat May 30 20:56:16 CEST 2009
Stefano Sabatini wrote:
> Hi all,
>
> I'm experimenting with a graph chain of this kind:
> ffplay in.avi -vfilters "split [out] [select], [select] select='eq(mod(N, 10), 0)', snapshot"
I suppose you mean
ffplay in.avi -vfilters "split [out] [select]; [select]
select='eq(mod(N, 10), 0)', snapshot"
(note the ';')
or
ffplay in.avi -vfilters "split [out] select='eq(mod(N, 10), 0)', snapshot"
?
> the problem is that the config_props of the snapshot is never called,
> since the code which do the configuration:
>
> if(avfilter_config_links(filt_out)) goto the_end;
>
> only configure the part of the graph from the application output
> filers towards the beginning.
>
> Suggested function call avfilter_config_links(filt_out) on all the
> output filters of a graph (that is filters which one input and no
> output).
> +int avfilter_graph_config_links(AVFilterGraph *graph, AVClass *log_ctx)
> +{
> + AVFilterContext *filt;
> + int i, ret;
> +
> + for (i=0; i < graph->filter_count; i++) {
> + filt = graph->filters[i];
> +
> + if (!filt->output_count) {
> + if ((ret = avfilter_config_links(filt)))
> + return ret;
> + }
> + }
Hmmm... I'm fine with the patch, but I think this makes the
recursiveness of avfilter_config_links() useless. Since it doesn't work
for the example you've given, I'd say it should be removed (but it can
be another patch).
-Vitor
More information about the ffmpeg-devel
mailing list