aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-30 16:38:51 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-31 08:19:45 +0200
commite328178da90f44690e0076f4dbfd16da9175f441 (patch)
treec12420af640a2bd4b658ce7f6fd51313dee125a4 /libavcodec/qsvdec.c
parented1cd81076434b76f37576d4d806973476a8e96c (diff)
downloadffmpeg-e328178da90f44690e0076f4dbfd16da9175f441.tar.gz
qsvdec: only access hwaccel_context is the pixel format is QSV
We do not strictly specify that hwaccel_context must be cleared if no hwaccel is used. Reported-By: wm4 <nfxjfg@googlemail.com>
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 4802932ea7..e19eba5b52 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -106,7 +106,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
return AVERROR(ENOMEM);
}
- if (avctx->hwaccel_context) {
+ if (avctx->pix_fmt == AV_PIX_FMT_QSV && avctx->hwaccel_context) {
AVQSVContext *user_ctx = avctx->hwaccel_context;
session = user_ctx->session;
iopattern = user_ctx->iopattern;