aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-09-18 13:28:05 -0300
committerJames Almer <jamrial@gmail.com>2018-09-18 13:28:05 -0300
commitf4cf6ba8c9646814af842a99335c6ee312ded299 (patch)
tree540abb57a2984b9f0596cc4d75b39c8e96258dd6
parentbd10c1e9a86c9e5f1593f7b178ea060ea965f81c (diff)
parenta2041a6522642859ce64af1c618d6fb90a50d4af (diff)
downloadffmpeg-f4cf6ba8c9646814af842a99335c6ee312ded299.tar.gz
Merge commit 'a2041a6522642859ce64af1c618d6fb90a50d4af'
* commit 'a2041a6522642859ce64af1c618d6fb90a50d4af': qsvenc: AV_PIX_FMT_QSV path should release frame Merged-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/qsvenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 029e8f301a..948751daf4 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1026,6 +1026,9 @@ static void clear_unused_frames(QSVEncContext *q)
while (cur) {
if (cur->used && !cur->surface.Data.Locked) {
free_encoder_ctrl_payloads(&cur->enc_ctrl);
+ if (cur->frame->format == AV_PIX_FMT_QSV) {
+ av_frame_unref(cur->frame);
+ }
cur->used = 0;
}
cur = cur->next;