[FFmpeg-devel] [PATCH] lavfi/graphparser: remove disabled code in avfilter_graph_parse()
Stefano Sabatini
stefasab at gmail.com
Fri Apr 5 12:48:45 CEST 2013
---
libavfilter/graphparser.c | 67 ---------------------------------------------
1 file changed, 67 deletions(-)
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index a1e1b37..6b84d01 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -453,71 +453,6 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
AVFilterInOut **open_inputs_ptr, AVFilterInOut **open_outputs_ptr,
void *log_ctx)
{
-#if 0
- int ret;
- AVFilterInOut *open_inputs = open_inputs_ptr ? *open_inputs_ptr : NULL;
- AVFilterInOut *open_outputs = open_outputs_ptr ? *open_outputs_ptr : NULL;
- AVFilterInOut *cur, *match, *inputs = NULL, *outputs = NULL;
-
- if ((ret = avfilter_graph_parse2(graph, filters, &inputs, &outputs)) < 0)
- goto fail;
-
- /* First input can be omitted if it is "[in]" */
- if (inputs && !inputs->name)
- inputs->name = av_strdup("in");
- for (cur = inputs; cur; cur = cur->next) {
- if (!cur->name) {
- av_log(log_ctx, AV_LOG_ERROR,
- "Not enough inputs specified for the \"%s\" filter.\n",
- cur->filter_ctx->filter->name);
- ret = AVERROR(EINVAL);
- goto fail;
- }
- if (!(match = extract_inout(cur->name, &open_outputs)))
- continue;
- ret = avfilter_link(match->filter_ctx, match->pad_idx,
- cur->filter_ctx, cur->pad_idx);
- avfilter_inout_free(&match);
- if (ret < 0)
- goto fail;
- }
-
- /* Last output can be omitted if it is "[out]" */
- if (outputs && !outputs->name)
- outputs->name = av_strdup("out");
- for (cur = outputs; cur; cur = cur->next) {
- if (!cur->name) {
- av_log(log_ctx, AV_LOG_ERROR,
- "Invalid filterchain containing an unlabelled output pad: \"%s\"\n",
- filters);
- ret = AVERROR(EINVAL);
- goto fail;
- }
- if (!(match = extract_inout(cur->name, &open_inputs)))
- continue;
- ret = avfilter_link(cur->filter_ctx, cur->pad_idx,
- match->filter_ctx, match->pad_idx);
- avfilter_inout_free(&match);
- if (ret < 0)
- goto fail;
- }
-
- fail:
- if (ret < 0) {
- for (; graph->nb_filters > 0; graph->nb_filters--)
- avfilter_free(graph->filters[graph->nb_filters - 1]);
- av_freep(&graph->filters);
- }
- avfilter_inout_free(&inputs);
- avfilter_inout_free(&outputs);
- /* clear open_in/outputs only if not passed as parameters */
- if (open_inputs_ptr) *open_inputs_ptr = open_inputs;
- else avfilter_inout_free(&open_inputs);
- if (open_outputs_ptr) *open_outputs_ptr = open_outputs;
- else avfilter_inout_free(&open_outputs);
- return ret;
-}
-#else
int index = 0, ret = 0;
char chr = 0;
@@ -597,5 +532,3 @@ end:
}
return ret;
}
-
-#endif
--
1.7.9.5
More information about the ffmpeg-devel
mailing list