History

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

Stefano Sabatini committed 16 years ago

Commit f37c9341 parent 1460c791 file · +8 −4Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfiltergraph.c+8−4
@@ -147,11 +147,15 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 146 unmodified lines
147147 return -1;
148148
149149 scale->filter->query_formats(scale);
150− if(!avfilter_merge_formats(scale-> inputs[0]->in_formats,
151− scale-> inputs[0]->out_formats)||
152− !avfilter_merge_formats(scale->outputs[0]->in_formats,
153− scale->outputs[0]->out_formats))
150+ if (((link = scale-> inputs[0]) &&
151+ !avfilter_merge_formats(link->in_formats, link->out_formats)) ||
152+ ((link = scale->outputs[0]) &&
153+ !avfilter_merge_formats(link->in_formats, link->out_formats))) {
154+ av_log(log_ctx, AV_LOG_ERROR,
155+ "Impossible to convert between the formats supported by the filter "
156+ "'%s' and the filter '%s'\n", link->src->name, link->dst->name);
154157 return -1;
158+ }
155159 }
156160 }
157161 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t