[FFmpeg-cvslog] qsvdec: only access hwaccel_context is the pixel format is QSV
Anton Khirnov
git at videolan.org
Thu Mar 16 00:23:43 EET 2017
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Jul 30 16:38:51 2016 +0200| [e328178da90f44690e0076f4dbfd16da9175f441] | committer: 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: wm4 <nfxjfg at googlemail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e328178da90f44690e0076f4dbfd16da9175f441
---
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;
More information about the ffmpeg-cvslog
mailing list