History

avfiltergraph: call query_formats on inputs first.

This is a temporary workaround for amerge, until format renegociation is implemented. Should fix trac ticket #1400.

Nicolas George committed 14 years ago

Commit aba80651 parent 6a4c5c71 file · +7 −0Browse files

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

Unified · Split

libavfilter/avfiltergraph.c+7−0
@@ -235,8 +235,14 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 234 unmodified lines
235235 AVFilterFormats *samplerates;
236236 int scaler_count = 0, resampler_count = 0;
237237
238+ for (j = 0; j < 2; j++) {
238239 /* ask all the sub-filters for their supported media formats */
239240 for (i = 0; i < graph->filter_count; i++) {
241+ /* Call query_formats on sources first.
242+ This is a temporary workaround for amerge,
243+ until format renegociation is implemented. */
244+ if (!graph->filters[i]->input_count == j)
245+ continue;
240246 if (graph->filters[i]->filter->query_formats)
241247 ret = graph->filters[i]->filter->query_formats(graph->filters[i]);
242248 else
@@ -244,6 +250,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 1 unmodified line
244250 if (ret < 0)
245251 return ret;
246252 }
253+ }
247254
248255 /* go through and merge as many format lists as possible */
249256 for (i = 0; i < graph->filter_count; i++) {

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