aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhong Li <zhongli_dev@126.com>2019-12-28 22:28:45 +0800
committerZhong Li <zhongli_dev@126.com>2019-12-29 20:23:07 +0800
commit779951f7b2fb39f2321c41dc5971b26f8a9e89c9 (patch)
tree0eebd5b072c0a2b6209a7a2f029f65cd593805a4
parent9fff5c40a781098480210f96daba88aba287f316 (diff)
downloadffmpeg-779951f7b2fb39f2321c41dc5971b26f8a9e89c9.tar.gz
lavc/qsvdec: disable gpu copy when not supported
Signed-off-by: Zhong Li <zhongli_dev@126.com>
-rw-r--r--libavcodec/qsvdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index baaf1f205f..fc25dc73e5 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -99,9 +99,11 @@ static int qsv_init_session(AVCodecContext *avctx, QSVContext *q, mfxSession ses
int ret;
if (q->gpu_copy == MFX_GPUCOPY_ON &&
- !(q->iopattern & MFX_IOPATTERN_OUT_SYSTEM_MEMORY))
+ !(q->iopattern & MFX_IOPATTERN_OUT_SYSTEM_MEMORY)) {
av_log(avctx, AV_LOG_WARNING, "GPU-accelerated memory copy "
- "only works in MFX_IOPATTERN_OUT_SYSTEM_MEMORY.\n");
+ "only works in system memory mode.\n");
+ q->gpu_copy = MFX_GPUCOPY_OFF;
+ }
if (session) {
q->session = session;
} else if (hw_frames_ref) {