OSDN Git Service

avfiltergraph: fix format selection.
authorNicolas George <nicolas.george@normalesup.org>
Mon, 23 Apr 2012 14:55:11 +0000 (16:55 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Tue, 24 Apr 2012 14:35:15 +0000 (16:35 +0200)
commitfd2cd64fc9c29b5bcce2a0a332fa8d65134343ab
tree8dc7f89e6113085ab3d9e1b084b940bce6385330
parent62b745a6d3411c584bbac08374d7547060440809
avfiltergraph: fix format selection.

The old code had two bugs:

For audio filters, the format was not set.

For video filters, if several links reference the same format list,
the same format must be selected in the end. This is done by
setting formats->format_count to 1: the other links sharing
the reference will therefore have only one choice.
If the heuristic does not pick the first format, the selected format
must also be moved to the first position.
libavfilter/avfiltergraph.c