lavf/qsv: clone the frame which may be managed by framework
authorRuiling Song <ruiling.song@intel.com>
Tue, 3 Apr 2018 01:50:20 +0000 (09:50 +0800)
committerMark Thompson <sw@jkqxz.net>
Mon, 23 Apr 2018 21:56:18 +0000 (22:56 +0100)
commita768c0a3e1fa29eddc7dd348012b3093e476c94e
tree3346b9da894b57453b046cce6cdfb2789ae84632
parent58569162c280a0765b63441001d359e62824c9de
lavf/qsv: clone the frame which may be managed by framework

For filters based on framesync, the input frame was managed
by framesync, so we should not directly keep and destroy it,
instead we make a clone of it here, or else double-free will occur.
But for other filters not based on framesync, we still need to
free the input frame inside filter_frame.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
(cherry picked from commit d865783b6c8d4f96f5094ed72eff0f5a4a4908af)
libavfilter/qsvvpp.c
libavfilter/vf_vpp_qsv.c