[vlc-commits] commit: m3u: factorize. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Mon Jul 26 19:49:15 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 21 22:00:56 2010 +0200| [6345184e05cea06b712d45d1555be0de305d2fef] | committer: Rémi Duraffort 

m3u: factorize.
(cherry picked from commit d69171a2d863fad067d87df764d90572e3e509b4)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 modules/demux/playlist/m3u.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index 9320a6b..4817d7d 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -223,7 +223,7 @@ static int Demux( demux_t *p_demux )
             LocaleFree( psz_parse );
             free( psz_mrl );
 
-            if ( psz_artist && *psz_artist )
+            if ( !EMPTY_STR(psz_artist) )
                 input_item_SetArtist( p_input, psz_artist );
             if( psz_name ) input_item_SetTitle( p_input, psz_name );
 
@@ -242,12 +242,10 @@ static int Demux( demux_t *p_demux )
         {
             /* Cleanup state */
             while( i_options-- ) free( (char*)ppsz_options[i_options] );
-            free( ppsz_options );
-            ppsz_options = NULL; i_options = 0;
-            free( psz_name );
-            psz_name = NULL;
-            free( psz_artist );
-            psz_artist = NULL;
+            FREENULL( ppsz_options );
+            i_options = 0;
+            FREENULL( psz_name );
+            FREENULL( psz_artist );
             i_parsed_duration = 0;
             i_duration = -1;
 



More information about the vlc-commits mailing list