summaryrefslogtreecommitdiff
path: root/libavfilter/f_settb.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-21 22:19:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-21 22:20:49 +0200
commit9e1508f1e7a21aab9c25614c03d726e400c5691c (patch)
tree1450ec6130c71c5d1867b43c5333b0afc2e62212 /libavfilter/f_settb.c
parentf7e0c1854950b072dce4aa21053c1a344bf76c72 (diff)
parent4c9080a7ef18ad71fb0a75c8d1c1803edd780edd (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavfi: unref AVFilterLink.out_buf in ff_end_frame(). lavfi: unref AVFilterLink.cur_buf in ff_end_frame(). vsrc_testsrc: avoid an unnecessary avfilter_ref_buffer(). vf_slicify: clear AVFilterLink.cur_buf in start_frame(). vf_settb: simplify start_frame(). vf_fieldorder: don't give up its own reference to the output buffer. vf_pad: don't give up its own reference to the output buffer. vf_overlay: don't access a buffer reference that's been given away. vf_drawtext: don't give up its own reference to the input buffer. vf_gradfun: don't store two pointers to one AVFilterBufferRef. vf_delogo: don't store two pointers to one AVFilterBufferRef. vf_aspect: clear AVFilterLink.cur_buf in start_frame(). lavfi: add avfilter_unref_bufferp() Conflicts: doc/APIchanges libavfilter/avfilter.h libavfilter/buffer.c libavfilter/vf_aspect.c libavfilter/vf_drawtext.c libavfilter/vf_overlay.c libavfilter/vf_pad.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/f_settb.c')
-rw-r--r--libavfilter/f_settb.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libavfilter/f_settb.c b/libavfilter/f_settb.c
index 3ba35be70e..9aed96468d 100644
--- a/libavfilter/f_settb.c
+++ b/libavfilter/f_settb.c
@@ -103,18 +103,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);
}
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)