]> git.sesse.net Git - ffmpeg/commitdiff
scale2ref: override request_frame() and correctly connect them to the corresponding...
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 18 Aug 2015 13:10:30 +0000 (15:10 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 18 Aug 2015 13:59:23 +0000 (15:59 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vf_scale.c

index 07d52179e3c11518c4260d2c44c56aa8b3ef8c7b..9698bfbf7c1ab5215bbfd313f802b02c15289d0e 100644 (file)
@@ -433,6 +433,16 @@ static int config_props_ref(AVFilterLink *outlink)
     return 0;
 }
 
+static int request_frame(AVFilterLink *outlink)
+{
+    return ff_request_frame(outlink->src->inputs[0]);
+}
+
+static int request_frame_ref(AVFilterLink *outlink)
+{
+    return ff_request_frame(outlink->src->inputs[1]);
+}
+
 static int scale_slice(AVFilterLink *link, AVFrame *out_buf, AVFrame *cur_pic, struct SwsContext *sws, int y, int h, int mul, int field)
 {
     ScaleContext *scale = link->dst->priv;
@@ -697,11 +707,13 @@ static const AVFilterPad avfilter_vf_scale2ref_outputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_props,
+        .request_frame= request_frame,
     },
     {
         .name         = "ref",
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_props_ref,
+        .request_frame= request_frame_ref,
     },
     { NULL }
 };