Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrogerdpack <rogerpack2005@gmail.com>2015-07-01 22:23:55 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-07-02 05:56:10 +0300
commita1c03b9d58824d984a93f79a8939749b0699bfee (patch)
tree7ac3d78b0176719542fe3944f83a18ce380daffa /ffmpeg_filter.c
parent03b2b40fd7f010fc245d36c05c7439c058b927bf (diff)
ffmpeg_filter: log more information on failure to init simple filter graph
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r--ffmpeg_filter.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 0be49bea87..1ae8207eb0 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -947,8 +947,27 @@ int configure_filtergraph(FilterGraph *fg)
return ret;
if (simple && (!inputs || inputs->next || !outputs || outputs->next)) {
- av_log(NULL, AV_LOG_ERROR, "Simple filtergraph '%s' does not have "
- "exactly one input and output.\n", graph_desc);
+ const char *num_inputs;
+ const char *num_outputs;
+ if (!outputs) {
+ num_outputs = "0";
+ } else if (outputs->next) {
+ num_outputs = ">1";
+ } else {
+ num_outputs = "1";
+ }
+ if (!inputs) {
+ num_inputs = "0";
+ } else if (inputs->next) {
+ num_inputs = ">1";
+ } else {
+ num_inputs = "1";
+ }
+ av_log(NULL, AV_LOG_ERROR, "Simple filtergraph '%s' was expected "
+ "to have exactly 1 input and 1 output."
+ " However, it had %s input(s) and %s output(s)."
+ " Please adjust, or use a complex filtergraph (-filter_complex) instead.\n",
+ graph_desc, num_inputs, num_outputs);
return AVERROR(EINVAL);
}