]> git.sesse.net Git - ffmpeg/commitdiff
qsvenc: do not try to close the encoder if the session is NULL
authorAnton Khirnov <anton@khirnov.net>
Wed, 5 Aug 2015 11:40:03 +0000 (13:40 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 28 Sep 2015 13:42:56 +0000 (15:42 +0200)
libavcodec/qsvenc.c

index 752777bf309a30204a4f25dfe088e7fcc3f424ea..d6a731f4162889aba634647fe2cd7fefc6e84f60 100644 (file)
@@ -482,7 +482,8 @@ int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q)
 {
     QSVFrame *cur;
 
-    MFXVideoENCODE_Close(q->session);
+    if (q->session)
+        MFXVideoENCODE_Close(q->session);
     if (q->internal_session)
         MFXClose(q->internal_session);
     q->session          = NULL;