[FFmpeg-cvslog] scale2ref: override request_frame() and correctly connect them to the corresponding inputs

Michael Niedermayer git at videolan.org
Tue Aug 18 16:08:55 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Aug 18 15:10:30 2015 +0200| [22f85543ed92f4c6453b110137834151dee0d7eb] | committer: Michael Niedermayer

scale2ref: override request_frame() and correctly connect them to the corresponding inputs

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22f85543ed92f4c6453b110137834151dee0d7eb
---

 libavfilter/vf_scale.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 07d5217..9698bfb 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -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 }
 };



More information about the ffmpeg-cvslog mailing list