diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-08-05 13:40:03 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-09-28 15:42:56 +0200 |
commit | 83847cc8fa97e0fc637a0962bafb837acdb6eacc (patch) | |
tree | 183b13038924e6d33a6404789130a9e267806c4c | |
parent | 741b352b16dad74b87c4a39bade8902633a2b0e6 (diff) | |
download | ffmpeg-83847cc8fa97e0fc637a0962bafb837acdb6eacc.tar.gz |
qsvenc: do not try to close the encoder if the session is NULL
-rw-r--r-- | libavcodec/qsvenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 752777bf30..d6a731f416 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -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; |