[vlc-commits] [Git][videolan/vlc][master] 2 commits: resource: don't send the started event more than one time

Thomas Guillem (@tguillem) gitlab at videolan.org
Wed Dec 22 14:46:41 UTC 2021



Thomas Guillem pushed to branch master at VideoLAN / VLC


Commits:
e045c859 by Thomas Guillem at 2021-12-22T14:21:03+00:00
resource: don't send the started event more than one time

Refs #26394

- - - - -
c00bec8b by Thomas Guillem at 2021-12-22T14:21:03+00:00
resource: remove duplicated code

This code is already handled in vout_Request().

Fixes #26394

- - - - -


1 changed file:

- src/input/resource.c


Changes:

=====================================
src/input/resource.c
=====================================
@@ -494,17 +494,6 @@ vout_thread_t *input_resource_RequestVout(input_resource_t *p_resource,
         return dcfg.vout;
     }
 
-    if (vout_rsc->started)
-    {
-        assert(cfg->vout != NULL);
-        int ret = vout_ChangeSource(dcfg.vout, dcfg.fmt);
-        if (ret == 0)
-        {
-            vlc_mutex_unlock(&p_resource->lock);
-            return dcfg.vout;
-        }
-    }
-
     if (vout_Request(&dcfg, vctx, p_resource->p_input)) {
         if (vout_rsc->started && vout_state != NULL)
             *vout_state = INPUT_RESOURCE_VOUT_STOPPED;
@@ -515,9 +504,12 @@ vout_thread_t *input_resource_RequestVout(input_resource_t *p_resource,
         return NULL;
     }
 
-    vout_rsc->started = true;
-    if (vout_state != NULL)
-        *vout_state = INPUT_RESOURCE_VOUT_STARTED;
+    if (!vout_rsc->started)
+    {
+        vout_rsc->started = true;
+        if (vout_state != NULL)
+            *vout_state = INPUT_RESOURCE_VOUT_STARTED;
+    }
 
     DisplayVoutTitle(p_resource, cfg->vout, &vout_rsc->psz_prev_title);
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/52a789ea8197ff22ccb37d42dce1a825cedadb83...c00bec8bc7adb3fa36c0ff23d6883fc4d2b1bf91

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/52a789ea8197ff22ccb37d42dce1a825cedadb83...c00bec8bc7adb3fa36c0ff23d6883fc4d2b1bf91
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list