提交 e328178d 编写于 作者: A Anton Khirnov

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: Nwm4 <nfxjfg@googlemail.com>
上级 ed1cd810
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册