aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-10-03 20:44:38 +0200
committerAnton Khirnov <anton@khirnov.net>2024-10-07 10:53:09 +0200
commit4472bddb18f332ad95e789277b4071881ad41019 (patch)
treec6c2c94f54bf74fb13c2652cf32e1ee7aab5f70c /libavfilter/avfilter.c
parent71f176e3ce754bc5c332caccf99e85da90896525 (diff)
downloadffmpeg-4472bddb18f332ad95e789277b4071881ad41019.tar.gz
lavfi/avfilter: move AVFilterContext.command_queue to FFFilterContext
It is private to generic filtering code.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index dfb30002b1..86bf7773e1 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -80,10 +80,11 @@ static void tlog_ref(void *ctx, AVFrame *ref, int end)
static void command_queue_pop(AVFilterContext *filter)
{
- AVFilterCommand *c= filter->command_queue;
+ FFFilterContext *ctxi = fffilterctx(filter);
+ AVFilterCommand *c = ctxi->command_queue;
av_freep(&c->arg);
av_freep(&c->command);
- filter->command_queue= c->next;
+ ctxi->command_queue = c->next;
av_free(c);
}
@@ -828,9 +829,8 @@ void avfilter_free(AVFilterContext *filter)
av_freep(&filter->inputs);
av_freep(&filter->outputs);
av_freep(&filter->priv);
- while(filter->command_queue){
+ while (ctxi->command_queue)
command_queue_pop(filter);
- }
av_opt_free(filter);
av_expr_free(ctxi->enable);
ctxi->enable = NULL;
@@ -1545,7 +1545,8 @@ int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe)
int ff_inlink_process_commands(AVFilterLink *link, const AVFrame *frame)
{
- AVFilterCommand *cmd = link->dst->command_queue;
+ FFFilterContext *ctxi = fffilterctx(link->dst);
+ AVFilterCommand *cmd = ctxi->command_queue;
while(cmd && cmd->time <= frame->pts * av_q2d(link->time_base)){
av_log(link->dst, AV_LOG_DEBUG,
@@ -1553,7 +1554,7 @@ int ff_inlink_process_commands(AVFilterLink *link, const AVFrame *frame)
cmd->time, cmd->command, cmd->arg);
avfilter_process_command(link->dst, cmd->command, cmd->arg, 0, 0, cmd->flags);
command_queue_pop(link->dst);
- cmd= link->dst->command_queue;
+ cmd = ctxi->command_queue;
}
return 0;
}