diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-11 11:00:48 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-20 21:08:50 +0200 |
commit | 0393af4f0b9a536fb2a005c94aeb3a476db2645b (patch) | |
tree | 2b8a958da124fa6dd34fb2e1a647079a67a65b78 /libavfilter | |
parent | 9203fa0b3225cfb79b37270b2db1200d9183b3b8 (diff) | |
download | ffmpeg-streaming-0393af4f0b9a536fb2a005c94aeb3a476db2645b.zip ffmpeg-streaming-0393af4f0b9a536fb2a005c94aeb3a476db2645b.tar.gz |
vf_settb: simplify start_frame().
Avoid pointless filter ref/unref. Just use the reference passed to
start_frame().
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_settb.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavfilter/vf_settb.c b/libavfilter/vf_settb.c index 62084bf..ccd41cc 100644 --- a/libavfilter/vf_settb.c +++ b/libavfilter/vf_settb.c @@ -108,18 +108,17 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; - AVFilterBufferRef *picref2 = picref; if (av_cmp_q(inlink->time_base, outlink->time_base)) { - picref2 = avfilter_ref_buffer(picref, ~0); - picref2->pts = av_rescale_q(picref->pts, 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); 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, picref ->pts, - outlink->time_base.num, outlink->time_base.den, picref2->pts); - avfilter_unref_buffer(picref); + inlink ->time_base.num, inlink ->time_base.den, orig_pts, + outlink->time_base.num, outlink->time_base.den, picref->pts); } + inlink->cur_buf = NULL; - ff_start_frame(outlink, picref2); + ff_start_frame(outlink, picref); } AVFilter avfilter_vf_settb = { |