summaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 00990ba..84caec2 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -293,7 +293,8 @@ static void close_decoder(QSVContext *q)
{
QSVFrame *cur;
- MFXVideoDECODE_Close(q->session);
+ if (q->session)
+ MFXVideoDECODE_Close(q->session);
cur = q->work_frames;
while (cur) {
OpenPOWER on IntegriCloud