Skip to content

Commit aef199e

Browse files
ruiling-songlizhong1008
authored andcommitted
lavf/qsv: release the frame in filter_frame().
We must release the input frame in filter_frame(). but for filters like overlay, which is based on framesync. the input frame was managed by framesync.c. To handle this problem, we clone the frame in qsvvpp.c when filtering a frame. So as we are adding an frame_clone() in qsvvpp.c, we need to add back the frame release for filters that is not based on framesync. Signed-off-by: Ruiling Song <ruiling.song@intel.com>
1 parent afbd3cc commit aef199e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

libavfilter/vf_vpp_qsv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
340340
VPPContext *vpp = inlink->dst->priv;
341341
AVFilterLink *outlink = ctx->outputs[0];
342342

343-
if (vpp->qsv)
343+
if (vpp->qsv) {
344344
ret = ff_qsvvpp_filter_frame(vpp->qsv, inlink, picref);
345-
else {
345+
av_frame_free(&picref);
346+
} else {
346347
if (picref->pts != AV_NOPTS_VALUE)
347348
picref->pts = av_rescale_q(picref->pts, inlink->time_base, outlink->time_base);
348349
ret = ff_filter_frame(outlink, picref);

0 commit comments

Comments
 (0)