[vlc-commits] Setid: small fix

Jean-Baptiste Kempf git at videolan.org
Wed Jan 19 23:42:50 CET 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jan 19 23:42:06 2011 +0100| [cad5438ff91b6a664e5e0ab2753ee2cf6bfe8c12] | committer: Jean-Baptiste Kempf

Setid: small fix

Sorry, I failed my merge ;)

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

 modules/stream_out/setid.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/stream_out/setid.c b/modules/stream_out/setid.c
index c2c12cc..b02bab3 100644
--- a/modules/stream_out/setid.c
+++ b/modules/stream_out/setid.c
@@ -88,9 +88,10 @@ 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          = malloc( sizeof( sout_stream_sys_t ) );
+    p_sys = malloc( sizeof( sout_stream_sys_t ) );
+    if( unlikely( !p_sys ) )
+        return VLC_ENOMEM;
 
     if( !p_stream->p_next )
     {
@@ -102,10 +103,8 @@ static int Open( vlc_object_t *p_this )
     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 "new-id", &val );
-    p_sys->i_new_id = val.i_int;
+    p_sys->i_id = var_GetInteger( p_stream, SOUT_CFG_PREFIX "id" );
+    p_sys->i_new_id = var_GetInteger( p_stream, SOUT_CFG_PREFIX "new-id" );
 
     p_stream->pf_add    = Add;
     p_stream->pf_del    = Del;



More information about the vlc-commits mailing list