History

avfilter/vf_mix: add timeline support

Paul B Mahol committed 5 years ago

Commit 3583d2a1 parent e28b6e01 file · +10 −1Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_mix.c+10−1
@@ -201,6 +201,14 @@ static int process_frame(FFFrameSync *fs) · 200 unmodified lines
201201 return ret;
202202 }
203203
204+ if (ctx->is_disabled) {
205+ out = av_frame_clone(s->frames[0]);
206+ if (!out)
207+ return AVERROR(ENOMEM);
208+ out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
209+ return ff_filter_frame(outlink, out);
210+ }
211+
204212 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
205213 if (!out)
206214 return AVERROR(ENOMEM);
@@ -337,7 +345,8 @@ AVFilter ff_vf_mix = { · 130 unmodified lines
337345 .init = init,
338346 .uninit = uninit,
339347 .activate = activate,
340− .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS,
348+ .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS |
349+ AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
341350 };
342351
343352 #endif /* CONFIG_MIX_FILTER */

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