Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -259,14 +259,21 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 258 unmodified lines | |||
| 259 | s->frames[s->nb_inputs - 1] = in; | 259 | s->frames[s->nb_inputs - 1] = in; |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | out = ff_get_video_buffer(outlink, outlink->w, outlink->h); | 262 | if (!ctx->is_disabled) { |
| 263 | if (!out) | 263 | out = ff_get_video_buffer(outlink, outlink->w, outlink->h); |
| 264 | return AVERROR(ENOMEM); | 264 | if (!out) |
| 265 | out->pts = s->frames[0]->pts; | 265 | return AVERROR(ENOMEM); |
| 266 | 266 | av_frame_copy_props(out, s->frames[0]); | |
| 267 | td.out = out; | 267 | |
| 268 | td.in = s->frames; | 268 | td.out = out; |
| 269 | ctx->internal->execute(ctx, amplify_frame, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx))); | 269 | td.in = s->frames; |
| 270 | ctx->internal->execute(ctx, amplify_frame, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx))); | ||
| 271 | } else { | ||
| 272 | out = av_frame_clone(s->frames[s->radius]); | ||
| 273 | if (!out) | ||
| 274 | return AVERROR(ENOMEM); | ||
| 275 | out->pts = s->frames[0]->pts; | ||
| 276 | } | ||
| 270 | 277 | ||
| 271 | return ff_filter_frame(outlink, out); | 278 | return ff_filter_frame(outlink, out); |
| 272 | } | 279 | } |
| @@ -316,6 +323,6 @@ AVFilter ff_vf_amplify = { · 43 unmodified lines | |||
| 316 | .inputs = inputs, | 323 | .inputs = inputs, |
| 317 | .init = init, | 324 | .init = init, |
| 318 | .uninit = uninit, | 325 | .uninit = uninit, |
| 319 | .flags = AVFILTER_FLAG_SLICE_THREADS, | 326 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, |
| 320 | .process_command = ff_filter_process_command, | 327 | .process_command = ff_filter_process_command, |
| 321 | }; | 328 | }; |