qsvdec: close the MFX decoder on uninit
authorAnton Khirnov <anton@khirnov.net>
Tue, 11 Aug 2015 12:52:31 +0000 (14:52 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 28 Sep 2015 13:45:17 +0000 (15:45 +0200)
libavcodec/qsvdec.c

index 44693d2..2b81688 100644 (file)
@@ -309,6 +309,9 @@ int ff_qsv_decode_close(QSVContext *q)
 {
     QSVFrame *cur = q->work_frames;
 
+    if (q->session)
+        MFXVideoDECODE_Close(q->session);
+
     while (cur) {
         q->work_frames = cur->next;
         av_frame_free(&cur->frame);