[libav-devel] [PATCH 07/11] qsvdec: close the MFX decoder on uninit

Anton Khirnov anton at khirnov.net
Wed Aug 12 15:07:18 CEST 2015


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

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 44693d2..2b81688 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -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);
-- 
2.0.0



More information about the libav-devel mailing list