Commit Graph

20 Commits

Author SHA1 Message Date
Andreas Rheinhardt
790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Anton Khirnov
1e7d2007c3 all: use designated initializers for AVOption.unit
Makes it robust against adding fields before it, which will be useful in
following commits.

Majority of the patch generated by the following Coccinelle script:

@@
typedef AVOption;
identifier arr_name;
initializer list il;
initializer list[8] il1;
expression tail;
@@
AVOption arr_name[] = { il, { il1,
- tail
+ .unit = tail
}, ...  };

with some manual changes, as the script:
* has trouble with options defined inside macros
* sometimes does not handle options under an #else branch
* sometimes swallows whitespace
2024-02-14 14:53:41 +01:00
Paul B Mahol
a30adf9f96 avfilter/framesync: fix OOM case
Fixes OOM when caller keeps adding frames into filtergraph
that reached EOF by other means, for example EOF is signalled
by other filter in filtergraph or by buffersink.
2023-11-30 11:08:34 +01:00
Michael Niedermayer
9450a4a7fe
avfilter/framesync: fix order of operation with = and <0
Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-03 22:16:33 +01:00
Paul B Mahol
e506ea3ce1 avfilter: use ff_inlink_make_frame_writable() 2023-02-12 13:32:00 +01:00
James Almer
0c3e3fd1b4 avfilter/framesync: add a new option to set how to sync streams based on secondary input timestamps
Include two values for it, a default one that sets/keeps the current behavior,
where the frame event generated by the primary input will have a timestamp
equal or higher than frames in secondary input, plus a new one where the
secondary input frame will be that with the absolute closest timestamp to that
of the frame event one.

Addresses ticket #9689, where the new optional behavior produces better frame
syncronization.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-10 09:15:37 -03:00
Andreas Rheinhardt
d6f4b91ba5 avfilter/framesync: Remove redundant setting of AVClass
Every filter exposing the framesync options via its child_next
callback already calls framesync_preinit() in its preinit callback.
So the filter is already preinited whenever its child_next is called.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-23 21:13:00 +02:00
Anton Khirnov
344149cf01 framesync: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Nicolas George
2a52f19a91 lavfi/framesync: use av_gcd_q(). 2020-05-23 15:51:45 +02:00
Gyan Doshi
3be4490014 avfilter/framesync: fix shortest with eof_action=pass
Shifted check of shortest to after repeatlast,
to ensure shortest=1 is always honoured.
2019-06-06 10:19:14 +05:30
Mark Thompson
d4d29052c3 lavfi/framesync: Add namespace prefix to framesync_get_class 2018-06-24 19:39:01 +01:00
Nicolas George
29b5f3115d lavfi/framesync: remove an invalid free. 2018-01-03 19:54:39 +01:00
Nicolas George
549ef6ef9a lavfi/framesync: remove dead code.
Fix CID 1416960.
2017-09-12 12:30:40 +02:00
Nicolas George
9bad5e5319 lavfi/framesync: reword repeatlast option help. 2017-09-12 11:14:25 +02:00
Nicolas George
5f5dcf44e3 lavfi: rename framesync2 to framesync. 2017-09-12 11:03:51 +02:00
Nicolas George
1b8e061cc5 lavfi: remove framesync. 2017-09-12 11:03:51 +02:00
Nicolas George
3b64e3ea45 lavf/framesync: detect EOF immediately.
Fix an infinite loop in forward_status_change().
2016-12-24 13:18:02 +01:00
Nicolas George
44f660e7e7 lavfi: remove FF_LINK_FLAG_REQUEST_LOOP.
It has no longer any effect.
2015-09-20 19:02:33 +02:00
Paul B Mahol
0190c372ef avfilter/framesync: allocate FFFrameSyncIn internally
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-08-26 11:12:23 +00:00
Nicolas George
53319d5c93 lavfi: add an API to synchronize multiple video inputs.
Compared to dualinput, this API can handle more than two
inputs and can generate frames synchronized to any or all
input streams.
2013-09-23 09:49:37 +02:00