[FFmpeg-cvslog] Merge commit 'a2041a6522642859ce64af1c618d6fb90a50d4af'

James Almer git at videolan.org
Tue Sep 18 19:29:46 EEST 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Sep 18 13:28:05 2018 -0300| [f4cf6ba8c9646814af842a99335c6ee312ded299] | committer: James Almer

Merge commit 'a2041a6522642859ce64af1c618d6fb90a50d4af'

* commit 'a2041a6522642859ce64af1c618d6fb90a50d4af':
  qsvenc: AV_PIX_FMT_QSV path should release frame

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4cf6ba8c9646814af842a99335c6ee312ded299
---

 libavcodec/qsvenc.c | 3 +++
 1 file changed, 3 insertions(+)

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;


======================================================================

diff --cc libavcodec/qsvenc.c
index 029e8f301a,17a0559f36..948751daf4
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@@ -1025,7 -1028,9 +1025,10 @@@ static void clear_unused_frames(QSVEncC
      QSVFrame *cur = q->work_frames;
      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;



More information about the ffmpeg-cvslog mailing list