this allow a filter to be written like this:
aformat =
sample_fmts = fltp|flt:
sample_rates = 44100|44800
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Define positive return values as non errors and leave further meaning undefined
This allows future extensions to use these values
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add function avfilter_graph_parse_ptr() and favor it in place of
avfilter_graph_parse(), which will be restored with the old/Libav
signature at the next bump.
If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the
Libav-compatible signature for avfilter_graph_parse().
At the next major bump the current implementation of
avfilter_graph_parse() should be dropped in favor of the Libav/old
implementation.
Should address trac ticket #2672.
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.