[FFmpeg-devel] [PATCH 4/5] avfilter/phase: add timeline support.

Clément Bœsch u at pkh.me
Sat May 3 22:48:29 CEST 2014


---
 libavfilter/vf_phase.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c
index dd3eced..0e23e81 100644
--- a/libavfilter/vf_phase.c
+++ b/libavfilter/vf_phase.c
@@ -243,6 +243,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     int plane, top, y;
     AVFrame *out;
 
+    /* if there is a skip in the timeline, we need to reset the context */
+    if (ctx->is_disabled) {
+        av_frame_free(&s->frame);
+        return ff_filter_frame(outlink, in);
+    }
+
     out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
     if (!out) {
         av_frame_free(&in);
@@ -311,4 +317,5 @@ AVFilter ff_vf_phase = {
     .query_formats = query_formats,
     .inputs        = phase_inputs,
     .outputs       = phase_outputs,
+    .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
 };
-- 
1.9.2



More information about the ffmpeg-devel mailing list