[vlc-commits] resource: inline RequestSout()

Rémi Denis-Courmont git at videolan.org
Thu Jan 21 19:56:06 UTC 2021


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 19 20:07:04 2021 +0200| [656d2a834ae7a08f97dd6e451974303c540c7506] | committer: Rémi Denis-Courmont

resource: inline RequestSout()

... into input_resource_PutSout() - with constant expansion.

(No functional changes, except trivially if !ENABLE_SOUT)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=656d2a834ae7a08f97dd6e451974303c540c7506
---

 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 d2c1ab844f..f4af95f39e 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -633,8 +633,15 @@ sout_instance_t *input_resource_RequestSout( input_resource_t *p_resource, const
 
 void input_resource_PutSout(input_resource_t *resource, sout_instance_t *sout)
 {
+    if (sout == NULL)
+    {
+        input_resource_TerminateSout(resource);
+        return;
+    }
+
     vlc_mutex_lock(&resource->lock);
-    RequestSout(resource, sout, NULL);
+    assert(resource->p_sout == NULL);
+    resource->p_sout = sout;
     vlc_mutex_unlock(&resource->lock);
 }
 



More information about the vlc-commits mailing list