Commit 779951f7 authored by Zhong Li's avatar Zhong Li

lavc/qsvdec: disable gpu copy when not supported

Signed-off-by: 's avatarZhong Li <zhongli_dev@126.com>
parent 9fff5c40
...@@ -99,9 +99,11 @@ static int qsv_init_session(AVCodecContext *avctx, QSVContext *q, mfxSession ses ...@@ -99,9 +99,11 @@ static int qsv_init_session(AVCodecContext *avctx, QSVContext *q, mfxSession ses
int ret; int ret;
if (q->gpu_copy == MFX_GPUCOPY_ON && 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 " 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) { if (session) {
q->session = session; q->session = session;
} else if (hw_frames_ref) { } else if (hw_frames_ref) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment