From bdf9a76226742c286330ea696de074c916aa726d Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Mon, 6 Jan 2020 12:59:36 +0800 Subject: [PATCH] Revert "msdkdec: make sure to use video memory on Linux" Commit a1584b6 caused big performance drop if the downstream element is not a msdk element because it is very slow to read data from video memory directly. This reverts commit a1584b6f99caaf61812ac6a9654ec0e6da8240da. --- sys/msdk/gstmsdkdec.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/msdk/gstmsdkdec.c b/sys/msdk/gstmsdkdec.c index 451703298f..90779a26b2 100644 --- a/sys/msdk/gstmsdkdec.c +++ b/sys/msdk/gstmsdkdec.c @@ -681,19 +681,19 @@ gst_msdkdec_start (GstVideoDecoder * decoder) { GstMsdkDec *thiz = GST_MSDKDEC (decoder); - /* TODO: Currently d3d allocator is not implemented. - * So decoder uses system memory by default on Windows. - */ -#ifndef _WIN32 - thiz->use_video_memory = TRUE; -#else - thiz->use_video_memory = FALSE; -#endif - if (gst_msdk_context_prepare (GST_ELEMENT_CAST (thiz), &thiz->context)) { GST_INFO_OBJECT (thiz, "Found context %" GST_PTR_FORMAT " from neighbour", thiz->context); + /* TODO: Currently d3d allocator is not implemented. + * So decoder uses system memory by default on Windows. + */ +#ifndef _WIN32 + thiz->use_video_memory = TRUE; +#else + thiz->use_video_memory = FALSE; +#endif + if (gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) { GstMsdkContext *parent_context, *msdk_context;