projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a9e1c1
)
qsvenc: AV_PIX_FMT_QSV path should release frame
author
Maxym Dmytrychenko
<maxim.d33@gmail.com>
Tue, 18 Sep 2018 07:47:52 +0000
(09:47 +0200)
committer
Maxym Dmytrychenko
<maxim.d33@gmail.com>
Tue, 18 Sep 2018 15:53:37 +0000
(17:53 +0200)
Fixes high memory usage and prevents over allocation of the frames via
proper unref.
Can be checked as:
-hwaccel qsv -c:v h264_qsv -i ../h264-conformance/CANL2_Sony_E.jsv -c:v
h264_qsv -b:v 2000k -y qsv.mp4
libavcodec/qsvenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/qsvenc.c
b/libavcodec/qsvenc.c
index
611449c
..
17a0559
100644
(file)
--- a/
libavcodec/qsvenc.c
+++ b/
libavcodec/qsvenc.c
@@
-1028,6
+1028,9
@@
static void clear_unused_frames(QSVEncContext *q)
QSVFrame *cur = q->work_frames;
while (cur) {
if (cur->used && !cur->surface.Data.Locked) {
+ if (cur->frame->format == AV_PIX_FMT_QSV) {
+ av_frame_unref(cur->frame);
+ }
cur->used = 0;
}
cur = cur->next;