vf_overlay: ensure the overlay frame does not get leaked.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Anton Khirnov 2012-07-25 08:42:26 +02:00 committed by Luca Barbato
parent 08fc1ad151
commit f431315a86
1 changed files with 1 additions and 0 deletions

View File

@ -239,6 +239,7 @@ static int start_frame_overlay(AVFilterLink *inlink, AVFilterBufferRef *inpicref
OverlayContext *over = ctx->priv;
inlink->cur_buf = NULL;
avfilter_unref_bufferp(&over->overpicref);
over->overpicref = inpicref;
over->overpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base,
ctx->outputs[0]->time_base);