Merge commit 'a2041a6522642859ce64af1c618d6fb90a50d4af'
authorJames Almer <jamrial@gmail.com>
Tue, 18 Sep 2018 16:28:05 +0000 (13:28 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 18 Sep 2018 16:28:05 +0000 (13:28 -0300)
* commit 'a2041a6522642859ce64af1c618d6fb90a50d4af':
  qsvenc: AV_PIX_FMT_QSV path should release frame

Merged-by: James Almer <jamrial@gmail.com>
1  2 
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;