1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavc/qsvdec: disable gpu copy when not supported

Signed-off-by: Zhong Li <zhongli_dev@126.com>
This commit is contained in:
Zhong Li 2019-12-28 22:28:45 +08:00
parent 9fff5c40a7
commit 779951f7b2

View File

@ -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) {