[vlc-commits] resource: remove now dead code

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 19 20:09:26 2021 +0200| [92e6839960c4707a1a653f394b39528aba03ec7f] | committer: Rémi Denis-Courmont

resource: remove now dead code

This is dead because psz_sout can no longer be NULL.

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

 src/input/resource.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index f4af95f39e..1f8a5d5e0e 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -145,13 +145,7 @@ static sout_instance_t *RequestSout( input_resource_t *p_resource,
                                      sout_instance_t *p_sout, const char *psz_sout )
 {
 #ifdef ENABLE_SOUT
-    if( !p_sout && !psz_sout )
-    {
-        DestroySout( p_resource );
-        return NULL;
-    }
-
-    assert( !p_sout || ( !p_resource->p_sout && !psz_sout ) );
+    assert( !p_sout );
 
     /* Check the validity of the sout */
     if( p_resource->p_sout &&
@@ -161,8 +155,6 @@ static sout_instance_t *RequestSout( input_resource_t *p_resource,
         DestroySout( p_resource );
     }
 
-    if( psz_sout )
-    {
         if( p_resource->p_sout )
         {
             /* Reuse it */
@@ -179,12 +171,6 @@ static sout_instance_t *RequestSout( input_resource_t *p_resource,
         p_resource->p_sout = NULL;
 
         return p_sout;
-    }
-    else
-    {
-        p_resource->p_sout = p_sout;
-        return NULL;
-    }
 #else
     VLC_UNUSED (p_resource); VLC_UNUSED (p_sout); VLC_UNUSED (psz_sout);
     return NULL;



More information about the vlc-commits mailing list