Commit 83847cc8 authored by Anton Khirnov's avatar Anton Khirnov

qsvenc: do not try to close the encoder if the session is NULL

parent 741b352b
...@@ -482,7 +482,8 @@ int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q) ...@@ -482,7 +482,8 @@ int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q)
{ {
QSVFrame *cur; QSVFrame *cur;
MFXVideoENCODE_Close(q->session); if (q->session)
MFXVideoENCODE_Close(q->session);
if (q->internal_session) if (q->internal_session)
MFXClose(q->internal_session); MFXClose(q->internal_session);
q->session = NULL; q->session = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment