[FFmpeg-devel] [PATCH 1/3] Make avfilter_parse_graph() output a more meaningful message when an invalid filterchain is detected.

Stefano Sabatini stefano.sabatini-lala
Fri Nov 12 01:32:38 CET 2010


---
 libavfilter/graphparser.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 99982b3..a04426a 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -339,6 +339,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
 
     do {
         AVFilterContext *filter;
+        const char *filterchain = filters;
         filters += strspn(filters, WHITESPACES);
 
         if ((ret = parse_inputs(&filters, &curr_inputs, &open_outputs, log_ctx)) < 0)
@@ -366,8 +367,8 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
 
         if (chr == ';' && curr_inputs) {
             av_log(log_ctx, AV_LOG_ERROR,
-                   "Could not find a output to link when parsing \"%s\"\n",
-                   filters - 1);
+                   "Invalid filterchain containing an unlabelled output pad: \"%s\"\n",
+                   filterchain);
             ret = AVERROR(EINVAL);
             goto fail;
         }
-- 
1.7.1




More information about the ffmpeg-devel mailing list