diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-13 00:09:24 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-13 00:09:24 +0000 |
commit | f37c934d20a92d873e2cbb2eb64876177a18d9a0 (patch) | |
tree | 8222b6a0679ec8885667aa090487d599d401649f /libavfilter | |
parent | 1460c79097b19c9ff0413df4d8d651dd5c1a9983 (diff) | |
download | ffmpeg-f37c934d20a92d873e2cbb2eb64876177a18d9a0.tar.gz |
Make query_formats() print an error message if an auto-inserted scale
filter cannot convert between input and output formats.
Originally committed as revision 21176 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfiltergraph.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index d46548e3e2..8fbbecf055 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -147,11 +147,15 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) return -1; scale->filter->query_formats(scale); - if(!avfilter_merge_formats(scale-> inputs[0]->in_formats, - scale-> inputs[0]->out_formats)|| - !avfilter_merge_formats(scale->outputs[0]->in_formats, - scale->outputs[0]->out_formats)) + if (((link = scale-> inputs[0]) && + !avfilter_merge_formats(link->in_formats, link->out_formats)) || + ((link = scale->outputs[0]) && + !avfilter_merge_formats(link->in_formats, link->out_formats))) { + 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; + } } } } |