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:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-11 13:15:40 +0400
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-11 13:55:54 +0400
commitf5901fd392889dabe0d2eb9005e62ac667655b2f (patch)
treeda62f6b11a074bf1a36b2b99a55ab90d0f5f50ea /libavfilter
parent7aa59471813f49f434fbc6460475c0871e80cef6 (diff)
avfiltergraph: use meaningful error codes
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfiltergraph.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index bdf22b3df9..d19fc59f00 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -90,7 +90,7 @@ int ff_avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)
av_log(log_ctx, AV_LOG_ERROR,
"Input pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any source\n",
filt->input_pads[j].name, filt->name, filt->filter->name);
- return -1;
+ return AVERROR(EINVAL);
}
}
@@ -99,7 +99,7 @@ int ff_avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)
av_log(log_ctx, AV_LOG_ERROR,
"Output pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any destination\n",
filt->output_pads[j].name, filt->name, filt->filter->name);
- return -1;
+ return AVERROR(EINVAL);
}
}
}
@@ -178,7 +178,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
av_log(log_ctx, AV_LOG_ERROR,
"Impossible to convert between the formats supported by the filter "
"'%s' and the filter '%s'\n", link->src->name, link->dst->name);
- return -1;
+ return AVERROR(EINVAL);
}
}
}
@@ -216,9 +216,11 @@ static void pick_formats(AVFilterGraph *graph)
int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)
{
+ int ret;
+
/* find supported formats from sub-filters, and merge along links */
- if (query_formats(graph, log_ctx))
- return -1;
+ if ((ret = query_formats(graph, log_ctx)) < 0)
+ return ret;
/* Once everything is merged, it's possible that we'll still have
* multiple valid media format choices. We pick the first one. */