From 9587ef9068096f6e19033f9fd4da99b635480cad Mon Sep 17 00:00:00 2001
From: philippegorley <philippe.gorley@savoirfairelinux.com>
Date: Tue, 23 May 2017 15:14:15 -0400
Subject: [PATCH] enable hardware decoding by default

This only activates hardware decoding if the setting wasn't found
in dring.yml or if there was an error while reading the file.

Change-Id: Ib256e327a4136a72df11873e9b0c662e0e00afce
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
---
 src/preferences.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/preferences.cpp b/src/preferences.cpp
index f0c6653d6e..9fa90d026d 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -548,7 +548,7 @@ void ShortcutPreferences::unserialize(const YAML::Node &in)
 #ifdef RING_VIDEO
 VideoPreferences::VideoPreferences()
 #ifdef RING_ACCEL
-    : decodingAccelerated_(false)
+    : decodingAccelerated_(true)
 #endif
 {
 }
@@ -570,7 +570,7 @@ void VideoPreferences::unserialize(const YAML::Node &in)
     // value may or may not be present
     try {
         parseValue(node, DECODING_ACCELERATED_KEY, decodingAccelerated_);
-    } catch (...) { decodingAccelerated_ = false; } // experimental, so disabled by default
+    } catch (...) { decodingAccelerated_ = true; }
 #endif
     getVideoDeviceMonitor().unserialize(in);
 }
-- 
GitLab