[FFmpeg-cvslog] lavc/qsvdec: disable gpu copy when not supported

Zhong Li git at videolan.org
Sun Dec 29 14:24:44 EET 2019


ffmpeg | branch: master | Zhong Li <zhongli_dev at 126.com> | Sat Dec 28 22:28:45 2019 +0800| [779951f7b2fb39f2321c41dc5971b26f8a9e89c9] | committer: Zhong Li

lavc/qsvdec: disable gpu copy when not supported

Signed-off-by: Zhong Li <zhongli_dev at 126.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=779951f7b2fb39f2321c41dc5971b26f8a9e89c9
---

 libavcodec/qsvdec.c | 6 ++++--
 1 file 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) {



More information about the ffmpeg-cvslog mailing list