From a01f2526663eee1d98f2e133d076a5dcb556d1ea Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Tue, 26 Apr 2022 11:30:31 +0200
Subject: [PATCH] gstreamer1.0-libav: disable decoder direct rendering by 
 default

DMA-buf 0-copy path and direct-rendering mode are not yet compatible
because of stride and offset issues.
Nevertheless performances are better than with direct-rendering enabled
and virtual memory path.

This fix is required to reach 30fps on display driver side
with 30fps VGA video content.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
 ext/libav/gstavviddec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index f5197fb..fde599b 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -41,7 +41,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
 
 #define DEFAULT_LOWRES			0
 #define DEFAULT_SKIPFRAME		0
-#define DEFAULT_DIRECT_RENDERING	TRUE
+#define DEFAULT_DIRECT_RENDERING	FALSE
 #define DEFAULT_MAX_THREADS		0
 #define DEFAULT_OUTPUT_CORRUPT		TRUE
 #define REQUIRED_POOL_MAX_BUFFERS       32
-- 
2.25.1

