resource: remove now dead code
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 19 Jan 2021 18:09:26 +0000 (20:09 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 21 Jan 2021 19:52:23 +0000 (21:52 +0200)
This is dead because psz_sout can no longer be NULL.

src/input/resource.c

index f4af95f..1f8a5d5 100644 (file)
@@ -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;