diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-08-05 10:49:18 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-08-15 19:27:01 +0200 |
commit | 54754eec1e4b4882e7bbe1fbf4374c11d955eb36 (patch) | |
tree | c0c87f01fd703e01dec9a4c81010c7f1fb86d63e /libavfilter/avfilter.c | |
parent | 426e33c75853c395b39e216e7ecde0103ff48086 (diff) | |
download | ffmpeg-54754eec1e4b4882e7bbe1fbf4374c11d955eb36.tar.gz |
lavfi: add a new struct for private link properties
Specifically those that should be visible to filters, but hidden from
API callers. Such properties are currently located at the end of the
public AVFilterLink struct, demarcated by a comment marking them as
private. However it is generally better to hide them explicitly, using
the same pattern already employed in avformat or avcodec.
The new struct is currently trivial, but will become more useful in
following commits.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index c4bd134fb2..80c9cf7b51 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -176,7 +176,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, li = av_mallocz(sizeof(*li)); if (!li) return AVERROR(ENOMEM); - link = &li->l; + link = &li->l.pub; src->outputs[srcpad] = dst->inputs[dstpad] = link; @@ -222,7 +222,7 @@ int avfilter_config_links(AVFilterContext *filter) static void update_link_current_pts(FilterLinkInternal *li, int64_t pts) { - AVFilterLink *const link = &li->l; + AVFilterLink *const link = &li->l.pub; if (pts == AV_NOPTS_VALUE) return; @@ -1077,7 +1077,7 @@ static int samples_ready(FilterLinkInternal *link, unsigned min) static int take_samples(FilterLinkInternal *li, unsigned min, unsigned max, AVFrame **rframe) { - AVFilterLink *link = &li->l; + AVFilterLink *link = &li->l.pub; AVFrame *frame0, *frame, *buf; unsigned nb_samples, nb_frames, i, p; int ret; @@ -1169,7 +1169,7 @@ static int ff_filter_frame_to_filter(AVFilterLink *link) static int forward_status_change(AVFilterContext *filter, FilterLinkInternal *li_in) { - AVFilterLink *in = &li_in->l; + AVFilterLink *in = &li_in->l.pub; unsigned out = 0, progress = 0; int ret; @@ -1431,7 +1431,7 @@ int ff_inlink_check_available_samples(AVFilterLink *link, unsigned min) static void consume_update(FilterLinkInternal *li, const AVFrame *frame) { - AVFilterLink *const link = &li->l; + AVFilterLink *const link = &li->l.pub; update_link_current_pts(li, frame->pts); ff_inlink_process_commands(link, frame); if (link == link->dst->inputs[0]) |