Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -26,6 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | #include <string.h> |
| 27 | 27 | |
| 28 | 28 | #include "libavutil/imgutils.h" |
| 29 | +#include "libavutil/opt.h" | |
| 29 | 30 | #include "libavutil/pixfmt.h" |
| 30 | 31 | #include "avfilter.h" |
| 31 | 32 | #include "drawutils.h" |
| @@ -154,7 +155,8 @@ static int activate(AVFilterContext *ctx) · 122 unmodified lines | ||
| 154 | 155 | } |
| 155 | 156 | |
| 156 | 157 | 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); | |
| 158 | 160 | ret = ff_filter_frame(outlink, s->main_frame); |
| 159 | 161 | av_frame_free(&s->alpha_frame); |
| 160 | 162 | s->main_frame = NULL; |
| @@ -203,13 +205,21 @@ static const AVFilterPad alphamerge_outputs[] = { · 42 unmodified lines | ||
| 203 | 205 | { NULL } |
| 204 | 206 | }; |
| 205 | 207 | |
| 208 | +static const AVOption alphamerge_options[] = { | |
| 209 | + { NULL } | |
| 210 | +}; | |
| 211 | + | |
| 212 | +AVFILTER_DEFINE_CLASS(alphamerge); | |
| 213 | + | |
| 206 | 214 | AVFilter ff_vf_alphamerge = { |
| 207 | 215 | .name = "alphamerge", |
| 208 | 216 | .description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second " |
| 209 | 217 | "input into the alpha channel of the first input."), |
| 210 | 218 | .priv_size = sizeof(AlphaMergeContext), |
| 219 | + .priv_class = &alphamerge_class, | |
| 211 | 220 | .query_formats = query_formats, |
| 212 | 221 | .inputs = alphamerge_inputs, |
| 213 | 222 | .outputs = alphamerge_outputs, |
| 214 | 223 | .activate = activate, |
| 224 | + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, | |
| 215 | 225 | }; |