1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/avfiltergraph: improve error message in graph_check_validity()

Fix trac ticket #1944.
This commit is contained in:
Stefano Sabatini 2012-11-21 21:27:02 +01:00
parent eb87b340e8
commit f67ebf5b77

View File

@ -113,22 +113,25 @@ static int graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)
int i, j; int i, j;
for (i = 0; i < graph->filter_count; i++) { for (i = 0; i < graph->filter_count; i++) {
const AVFilterPad *pad;
filt = graph->filters[i]; filt = graph->filters[i];
for (j = 0; j < filt->nb_inputs; j++) { for (j = 0; j < filt->nb_inputs; j++) {
if (!filt->inputs[j] || !filt->inputs[j]->src) { if (!filt->inputs[j] || !filt->inputs[j]->src) {
pad = &filt->input_pads[j];
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"Input pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any source\n", "Input pad \"%s\" with type %s of the filter instance \"%s\" of %s not connected to any source\n",
filt->input_pads[j].name, filt->name, filt->filter->name); pad->name, av_get_media_type_string(pad->type), filt->name, filt->filter->name);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
} }
for (j = 0; j < filt->nb_outputs; j++) { for (j = 0; j < filt->nb_outputs; j++) {
if (!filt->outputs[j] || !filt->outputs[j]->dst) { if (!filt->outputs[j] || !filt->outputs[j]->dst) {
pad = &filt->output_pads[j];
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"Output pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any destination\n", "Output pad \"%s\" with type %s of the filter instance \"%s\" of %s not connected to any destination\n",
filt->output_pads[j].name, filt->name, filt->filter->name); pad->name, av_get_media_type_string(pad->type), filt->name, filt->filter->name);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
} }