Libav, for some reason, merged this as a public API function. This will
aid in future merges.
A define is left for backwards compat, just in case some person
used it, since it is in a public header.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
vf_overlay video filter accepts expressions in its parameters. In
'frame-by-frame' evaluation mode it recalculates them regularly, but
incoming video frame size changes did not reflect in their values. So if
you used width or height of any source videos in expressions as
parameters, they stayed on their initial values. This patch corrects
this bug.
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Reviewed-by: Paul B Mahol <onemda@gmail.com
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Recent commits 6aaac24d72 and
3835554bf8 made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.
This commit addresses the issue of possible resource leaks when some intermediate
call fails.
Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.
Fixes: CID 1338327.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.
All of these were found by using av_warn_unused_result, demonstrating its utility.
Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.
Fixes: CID 1325680, 1325679, 1325678.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This is especially useful to debug queue overflow issues.
Ideally we should be able to set the debug message at the
dualinput/framesync level, but they do not have the information related
to the filter context and the inlink, so cannot access much useful
information.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
The image size of the destination image was used to determine if a source
image was positioned outside the destination image, that no intersection
could occur. Actually for these two cases the size of the source image
has to be used!
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* qatar/master:
vf_pad: use the name 's' for the pointer to the private context
vf_overlay: use the name 's' for the pointer to the private context
vf_lut: use the name 's' for the pointer to the private context
Conflicts:
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
With the introduction of AVFilterContext->is_disabled, we can simplify
the custom passthrough mode in filters.
This commit is technically a small compat break, but the timeline was
introduced very recently.
Doxy by Stefano Sabatini.
This is mostly automated global search and replace
The deprecated aconvert filter is disabled, if it still has users
it should be updated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This expression is useful to enable/disable overlaying on the fly.
Note that this can't be easily done relying on the filtergraph structure,
since this implies caching issues or a null frame overlaying in the best
case, which is better avoided for performance and convenience reasons.
Add support for dynamic x, y expressions evaluation.
Also add support for an evaluation mode which allows to disable per-frame
evaluation, so that there is no speedloss in case the expression does not
depend on frame variables.