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