]> git.sesse.net Git - vlc/commitdiff
Cosmetics
authorRémi Duraffort <ivoire@videolan.org>
Thu, 20 Jan 2011 19:52:18 +0000 (20:52 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 20 Jan 2011 20:01:27 +0000 (21:01 +0100)
modules/stream_out/delay.c
modules/stream_out/langfromtelx.c
modules/stream_out/setid.c

index 32220ccd06a6bae0bbad1596554b75723d7f0be0..919163f4dc56c5e1f6dea006515025407a923c97 100644 (file)
@@ -91,26 +91,23 @@ static int Open( vlc_object_t *p_this )
 {
     sout_stream_t     *p_stream = (sout_stream_t*)p_this;
     sout_stream_sys_t *p_sys;
-    vlc_value_t       val;
-
-    p_sys          = calloc( 1, sizeof( sout_stream_sys_t ) );
-    if( !p_sys )
-        return VLC_ENOMEM;
 
     if( !p_stream->p_next )
     {
         msg_Err( p_stream, "cannot create chain" );
-        free( p_sys );
         return VLC_EGENERIC;
     }
 
+    p_sys = calloc( 1, sizeof( sout_stream_sys_t ) );
+    if( !p_sys )
+        return VLC_ENOMEM;
+
+
     config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
                    p_stream->p_cfg );
 
-    var_Get( p_stream, SOUT_CFG_PREFIX "id", &val );
-    p_sys->i_id = val.i_int;
-    var_Get( p_stream, SOUT_CFG_PREFIX "delay", &val );
-    p_sys->i_delay = val.i_int * 1000;
+    p_sys->i_id = var_GetInteger( p_stream, SOUT_CFG_PREFIX "id" );
+    p_sys->i_delay = 1000 * var_GetInteger( p_stream, SOUT_CFG_PREFIX "delay" );
 
     p_stream->pf_add    = Add;
     p_stream->pf_del    = Del;
index 72394d3c24106759f8c71e7c4c51aed27dab78a7..5173779c0a2b56fbe5ca40a32158071bdca5af3d 100644 (file)
@@ -105,17 +105,16 @@ static int Open( vlc_object_t *p_this )
     sout_stream_t     *p_stream = (sout_stream_t*)p_this;
     sout_stream_sys_t *p_sys;
 
-    p_sys = malloc( sizeof( sout_stream_sys_t ) );
-    if( unlikely( !p_sys ) )
-        return VLC_ENOMEM;
-
     if( !p_stream->p_next )
     {
         msg_Err( p_stream, "cannot create chain" );
-        free( p_sys );
         return VLC_EGENERIC;
     }
 
+    p_sys = malloc( sizeof( sout_stream_sys_t ) );
+    if( unlikely( !p_sys ) )
+        return VLC_ENOMEM;
+
     config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
                        p_stream->p_cfg );
 
index a2d8d4a8863af4e2096e48a333445d7438937904..f2e23ae99add02319e9d44d6f098403d3dc74e49 100644 (file)
@@ -116,17 +116,16 @@ static int OpenCommon( vlc_object_t *p_this )
     sout_stream_t     *p_stream = (sout_stream_t*)p_this;
     sout_stream_sys_t *p_sys;
 
-    p_sys = malloc( sizeof( sout_stream_sys_t ) );
-    if( unlikely( !p_sys ) )
-        return VLC_ENOMEM;
-
     if( !p_stream->p_next )
     {
         msg_Err( p_stream, "cannot create chain" );
-        free( p_sys );
         return VLC_EGENERIC;
     }
 
+    p_sys = malloc( sizeof( sout_stream_sys_t ) );
+    if( unlikely( !p_sys ) )
+        return VLC_ENOMEM;
+
     p_stream->pf_del    = Del;
     p_stream->pf_send   = Send;