summaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_settb.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-27 07:49:45 +0100
committerAnton Khirnov <anton@khirnov.net>2012-11-28 08:50:19 +0100
commit565e4993c63f797e2d50ad2f1e8f62fdbe299666 (patch)
treebae5282b2ee875de4b01467f3cfaab54b0ab6ec0 /libavfilter/vf_settb.c
parentbb6c67bb36b136de10256f0999128df4a42f9ffc (diff)
downloadffmpeg-streaming-565e4993c63f797e2d50ad2f1e8f62fdbe299666.zip
ffmpeg-streaming-565e4993c63f797e2d50ad2f1e8f62fdbe299666.tar.gz
lavfi: merge start_frame/draw_slice/end_frame
Any alleged performance benefits gained from the split are purely mythological and do not justify added code complexity.
Diffstat (limited to 'libavfilter/vf_settb.c')
-rw-r--r--libavfilter/vf_settb.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libavfilter/vf_settb.c b/libavfilter/vf_settb.c
index 0b68b34..a572072 100644
--- a/libavfilter/vf_settb.c
+++ b/libavfilter/vf_settb.c
@@ -108,21 +108,20 @@ static int config_output_props(AVFilterLink *outlink)
return 0;
}
-static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
+static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
if (av_cmp_q(inlink->time_base, outlink->time_base)) {
- int64_t orig_pts = picref->pts;
- picref->pts = av_rescale_q(picref->pts, inlink->time_base, outlink->time_base);
+ int64_t orig_pts = frame->pts;
+ frame->pts = av_rescale_q(frame->pts, inlink->time_base, outlink->time_base);
av_log(ctx, AV_LOG_DEBUG, "tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n",
inlink ->time_base.num, inlink ->time_base.den, orig_pts,
- outlink->time_base.num, outlink->time_base.den, picref->pts);
+ outlink->time_base.num, outlink->time_base.den, frame->pts);
}
- inlink->cur_buf = NULL;
- return ff_start_frame(outlink, picref);
+ return ff_filter_frame(outlink, frame);
}
static const AVFilterPad avfilter_vf_settb_inputs[] = {
@@ -130,8 +129,7 @@ static const AVFilterPad avfilter_vf_settb_inputs[] = {
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
- .start_frame = start_frame,
- .end_frame = ff_null_end_frame
+ .filter_frame = filter_frame,
},
{ NULL }
};
OpenPOWER on IntegriCloud