[vlc-commits] demux: allow filter creation to fail

Rémi Denis-Courmont git at videolan.org
Sun Jul 30 20:26:58 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 30 21:15:42 2017 +0300| [ca9bb993f895f5072f0a8dee4358d35fc7296117] | committer: Rémi Denis-Courmont

demux: allow filter creation to fail

Just skip the chain entry. This is consistent with the behaviour of all
or almost all other configuration chains (notably stream filters).

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

 src/input/demux.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/input/demux.c b/src/input/demux.c
index 109a386775..aafa0d62ad 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -634,21 +634,10 @@ demux_t *demux_FilterChainNew( demux_t *p_demux, const char *psz_chain )
 
         free( p_name );
 
-        if( p_next == NULL )
-            goto error;
-
         p_demux = p_next;
     }
 
     vlc_array_clear(&name);
 
     return p_demux;
- error:
-    demux_Delete(p_demux);
-
-    while(i--)
-        free(vlc_array_item_at_index(&name, i));
-    vlc_array_clear(&name);
-
-    return NULL;
 }



More information about the vlc-commits mailing list