aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-15 23:22:50 +0100
committerClément Bœsch <u@pkh.me>2017-03-15 23:22:50 +0100
commitaabe525734aa591debd6a5a00adbe7c6af7f3882 (patch)
tree1c879bc48685a3f0229c2f381a9fe77e5b1d828f /libavcodec
parente887d685f74197cda153c0ec57f9cb719a33932b (diff)
parente328178da90f44690e0076f4dbfd16da9175f441 (diff)
downloadffmpeg-aabe525734aa591debd6a5a00adbe7c6af7f3882.tar.gz
Merge commit 'e328178da90f44690e0076f4dbfd16da9175f441'
* commit 'e328178da90f44690e0076f4dbfd16da9175f441': qsvdec: only access hwaccel_context is the pixel format is QSV Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 06056a3061..dc9db2fafb 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;