Module: libav Branch: master Commit: e328178da90f44690e0076f4dbfd16da9175f441
Author: Anton Khirnov <[email protected]> Committer: Anton Khirnov <[email protected]> Date: Sat Jul 30 16:38:51 2016 +0200 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 <[email protected]> --- libavcodec/qsvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 4802932..e19eba5 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; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
