[vlc-devel] commit: sout std: factorize. ( Rémi Duraffort )

git version control git at videolan.org
Sat Oct 10 11:57:44 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Oct  2 19:42:38 2009 +0200| [ebf91bfc08314dab4da3b389a00b7c43f7d81c1c] | committer: Rémi Duraffort 

sout std: factorize.

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

 modules/stream_out/standard.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 34e86bd..8ced7ae 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -209,17 +209,9 @@ static int Open( vlc_object_t *p_this )
         free( val.psz_string );
     }
 
-    var_Get( p_stream, SOUT_CFG_PREFIX "mux", &val );
-    psz_mux = *val.psz_string ? val.psz_string : NULL;
-    if( !*val.psz_string ) free( val.psz_string );
-
-    var_Get( p_stream, SOUT_CFG_PREFIX "bind", &val );
-    psz_bind = *val.psz_string ? val.psz_string : NULL;
-    if( !*val.psz_string ) free( val.psz_string);
-
-    var_Get( p_stream, SOUT_CFG_PREFIX "path", &val );
-    psz_path = *val.psz_string ? val.psz_string : NULL;
-    if( !*val.psz_string ) free( val.psz_string);
+    psz_mux = var_GetNonEmptyString( p_stream, SOUT_CFG_PREFIX "mux" );
+    psz_bind = var_GetNonEmptyString( p_stream, SOUT_CFG_PREFIX "bind" );
+    psz_path = var_GetNonEmptyString( p_stream, SOUT_CFG_PREFIX "path" );
 
     if( psz_bind ) psz_url = psz_bind;
     if( psz_url && psz_path ) 




More information about the vlc-devel mailing list