[gnome-subtitles: 1/2] Fix #171: GStreamer Decoding Error while seeking with some files due to vaapi



commit 4615169200f5f3e652ebe47d3367275f0329e839
Author: Pedro Castro <pedro gnomesubtitles org>
Date:   Wed Sep 8 22:42:41 2021 +0100

    Fix #171: GStreamer Decoding Error while seeking with some files due to vaapi

 src/External/GstBackend/GstBackend.cs | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/External/GstBackend/GstBackend.cs b/src/External/GstBackend/GstBackend.cs
index 2184adb..c084f8a 100644
--- a/src/External/GstBackend/GstBackend.cs
+++ b/src/External/GstBackend/GstBackend.cs
@@ -96,6 +96,13 @@ namespace External.GStreamer {
                /* Public methods */
 
                public override void Initialize() {
+               
+                       //Disable LIBVA by default as it's causing lots of problems. This is done by setting 
an invalid driver name.
+                       if (!"FALSE".Equals(Environment.GetEnvironmentVariable("GS_DISABLE_LIBVA"))) {
+                               Logger.Info("[GstBackend] Disabling libva");
+                               Environment.SetEnvironmentVariable("LIBVA_DRIVER_NAME", "GNOME_SUBTITLES");
+                       }
+                       
                        IntPtr ptr = gst_backend_init(OnErrorFound, OnLoadComplete, OnEndOfStreamReached);
                        if (ptr == IntPtr.Zero) {
                                throw new Exception("Unable to initialize gstreamer: gst_backend_init 
returned no pointer.");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]