]> git.sesse.net Git - ffmpeg/commit
graphparser: fix the order of connecting unlabeled links.
authorAnton Khirnov <anton@khirnov.net>
Mon, 9 Apr 2012 03:01:05 +0000 (05:01 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sat, 14 Apr 2012 07:25:46 +0000 (09:25 +0200)
commit4e781c25b7b1955d1a9a0b0771c3ce1acb0957bd
tree2514fd2659978cdd2f34e146f44c0d5e5a2ef397
parentd7bcc71dadea71d86a2b95a4f46aedd392f8b948
graphparser: fix the order of connecting unlabeled links.

Right now, e.g. scale,[in]overlay would connect scale to the first
overlay input and [in] to the second, which goes against the
documentation and is unintuitive.

The bug happens because of the ordering mess in curr_inputs variable:
1) the unlabeled links from the previous filter are added to it in
correct order
2) input labels are parsed and inserted to the beginning one by one
(i.e. in reverse order)
3) curr_inputs is matched against filter inputs in reverse order

Fix the problem by always using proper ordering without trying to be
clever.
libavfilter/graphparser.c