Since we do not support "standalone" filters not attached to an
AVFilterGraph, we should not have a public function to create such
filters. In addition that function is horribly named, the action it does
cannot be possibly described as "opening" a filter.
As far as I can tell the code should not change behaviour
depending on locale in any of these places.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This is required for letting applications to create and destroy
AVFilterInOut structs in a convenient way.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
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.
Unlike avfilter_graph_parse(), it returns unlinked inputs and outputs
to the caller, which allows parsing of graphs where inputs/outputs are
not known in advance.
Since avfilter_graph_parse() creates the "[in]" inout for the first
unlabelled input pad, it is expected that it will create an "[out]"
inout for last unlabelled output pad, even in the case where it cannot
find any open input pad with that name.
This change removes the check on the existence of an open input pad
named "out", so it simplifies the checked condition while implementing
a more intuitive behavior.
Create open_inputs and open_outputs structs if they are not provided by
the user, and free them before exit.
In particular, fix NULL pointer dereference and crash, in case the
passed open_inputs/outputs is NULL and the parsing failed.
Fix a crash occurring when open_inputs is NULL and *open_inputs is
checked, the crash was introduced by the recent avfilter_graph_parse()
syntax change.
In particular, fix graph2dot crash.
Make avfilter_graph_parse() only release the internal structures
allocated during the parsing, and leave to free the graph itself to
the calling code.
This approach looks cleaner, as the graph is not allocated by the
function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e8e5dde779)
Make avfilter_graph_parse() only release the internal structures
allocated during the parsing, and leave to free the graph itself to
the calling code.
This approach looks cleaner, as the graph is not allocated by the
function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
The new name is shorter and more consistent with the FFmpeg API, and
sounds less evil.
Originally committed as revision 25707 to svn://svn.ffmpeg.org/ffmpeg/trunk
avfilter_graph_parse() declaration to libavfilter/avfiltergraph.h.
Simplify, and less confusing for the user.
Originally committed as revision 25705 to svn://svn.ffmpeg.org/ffmpeg/trunk