summaryrefslogtreecommitdiff
path: root/libavfilter/vf_interlace.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-05-26 19:17:55 +0000
committerPaul B Mahol <onemda@gmail.com>2013-05-27 09:55:40 +0000
commit68def27124aef37469e18eba411b4df64233a301 (patch)
tree5dd97c7568357d80ada9079c529f8dfa40cb9096 /libavfilter/vf_interlace.c
parented1c83508ec920bfef773e3aa3ac1764a65826ec (diff)
lavfi/interlace: remove request frame hack
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_interlace.c')
-rw-r--r--libavfilter/vf_interlace.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index 3315fb00a5..38970b09c4 100644
--- a/libavfilter/vf_interlace.c
+++ b/libavfilter/vf_interlace.c
@@ -51,7 +51,6 @@ typedef struct {
enum ScanMode scan; // top or bottom field first scanning
int lowpass; // enable or disable low pass filterning
AVFrame *cur, *next; // the two frames from which the new one is obtained
- int got_output; // signal an output frame is reday to request_frame()
} InterlaceContext;
#define OFFSET(x) offsetof(InterlaceContext, x)
@@ -115,6 +114,7 @@ static int config_out_props(AVFilterLink *outlink)
// half framerate
outlink->time_base.num *= 2;
outlink->frame_rate.den *= 2;
+ outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
av_log(ctx, AV_LOG_VERBOSE, "%s interlacing %s lowpass filter\n",
s->scan == MODE_TFF ? "tff" : "bff", (s->lowpass) ? "with" : "without");
@@ -205,20 +205,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
av_frame_free(&s->next);
ret = ff_filter_frame(outlink, out);
- s->got_output = 1;
-
- return ret;
-}
-
-static int request_frame(AVFilterLink *outlink)
-{
- AVFilterContext *ctx = outlink->src;
- InterlaceContext *s = ctx->priv;
- int ret = 0;
-
- s->got_output = 0;
- while (ret >= 0 && !s->got_output)
- ret = ff_request_frame(ctx->inputs[0]);
return ret;
}
@@ -237,7 +223,6 @@ static const AVFilterPad outputs[] = {
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_out_props,
- .request_frame = request_frame,
},
{ NULL }
};