History

avfilter/vf_alphamerge: add timeline support

Paul B Mahol committed 6 years ago

Commit cbd5a451 parent a8d82cc1 file · +11 −1Browse files

Unified · Split

libavfilter/vf_alphamerge.c+11−1
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 #include <string.h>
2727
2828 #include "libavutil/imgutils.h"
29+#include "libavutil/opt.h"
2930 #include "libavutil/pixfmt.h"
3031 #include "avfilter.h"
3132 #include "drawutils.h"
@@ -154,7 +155,8 @@ static int activate(AVFilterContext *ctx) · 122 unmodified lines
154155 }
155156
156157 if (s->main_frame && s->alpha_frame) {
157− draw_frame(ctx, s->main_frame, s->alpha_frame);
158+ if (!ctx->is_disabled)
159+ draw_frame(ctx, s->main_frame, s->alpha_frame);
158160 ret = ff_filter_frame(outlink, s->main_frame);
159161 av_frame_free(&s->alpha_frame);
160162 s->main_frame = NULL;
@@ -203,13 +205,21 @@ static const AVFilterPad alphamerge_outputs[] = { · 42 unmodified lines
203205 { NULL }
204206 };
205207
208+static const AVOption alphamerge_options[] = {
209+ { NULL }
210+};
211+
212+AVFILTER_DEFINE_CLASS(alphamerge);
213+
206214 AVFilter ff_vf_alphamerge = {
207215 .name = "alphamerge",
208216 .description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second "
209217 "input into the alpha channel of the first input."),
210218 .priv_size = sizeof(AlphaMergeContext),
219+ .priv_class = &alphamerge_class,
211220 .query_formats = query_formats,
212221 .inputs = alphamerge_inputs,
213222 .outputs = alphamerge_outputs,
214223 .activate = activate,
224+ .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
215225 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t