[vlc-commits] commit: m3u: factorize. ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Wed Jul 21 22:10:41 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 21 22:00:56 2010 +0200| [d69171a2d863fad067d87df764d90572e3e509b4] | committer: Rémi Duraffort
m3u: factorize.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d69171a2d863fad067d87df764d90572e3e509b4
---
modules/demux/playlist/m3u.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index 2ac9622..aaa8ab0 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -232,7 +232,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 );
if( !EMPTY_STR(psz_album_art) )
@@ -253,14 +253,11 @@ 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;
- free( psz_album_art );
- psz_album_art = NULL;
+ FREENULL( ppsz_options );
+ i_options = 0;
+ FREENULL( psz_name );
+ FREENULL( psz_artist );
+ FREENULL( psz_album_art );
i_parsed_duration = 0;
i_duration = -1;
More information about the vlc-commits
mailing list