[vlc-devel] [PATCH 06/31] input: resource: split the call to vout_Request()

Steve Lhomme robux4 at ycbcr.xyz
Mon Sep 23 17:01:11 CEST 2019


---
 src/input/resource.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index f05b6716e7b..b318c4cb0d8 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -426,7 +426,14 @@ vout_thread_t *input_resource_GetVoutHoldDevice(input_resource_t *p_resource,
     }
 #endif
 
-    if (vout_Request(cfg, pp_dec_dev, p_resource->p_input)) {
+    if (vout_HoldDevice(cfg, pp_dec_dev)) {
+        input_resource_PutVoutLocked(p_resource, cfg->vout, false);
+        vlc_mutex_unlock(&p_resource->lock);
+        return NULL;
+    }
+
+    int res = vout_RequestDisplay(cfg, p_resource->p_input);
+    if (res != 0) {
         input_resource_PutVoutLocked(p_resource, cfg->vout, false);
         vlc_mutex_unlock(&p_resource->lock);
         return NULL;
-- 
2.17.1



More information about the vlc-devel mailing list