Commit d69171a2 authored by Rémi Duraffort's avatar Rémi Duraffort

m3u: factorize.

parent c06c0301
...@@ -232,7 +232,7 @@ static int Demux( demux_t *p_demux ) ...@@ -232,7 +232,7 @@ static int Demux( demux_t *p_demux )
LocaleFree( psz_parse ); LocaleFree( psz_parse );
free( psz_mrl ); free( psz_mrl );
if ( psz_artist && *psz_artist ) if ( !EMPTY_STR(psz_artist) )
input_item_SetArtist( p_input, psz_artist ); input_item_SetArtist( p_input, psz_artist );
if( psz_name ) input_item_SetTitle( p_input, psz_name ); if( psz_name ) input_item_SetTitle( p_input, psz_name );
if( !EMPTY_STR(psz_album_art) ) if( !EMPTY_STR(psz_album_art) )
...@@ -253,14 +253,11 @@ static int Demux( demux_t *p_demux ) ...@@ -253,14 +253,11 @@ static int Demux( demux_t *p_demux )
{ {
/* Cleanup state */ /* Cleanup state */
while( i_options-- ) free( (char*)ppsz_options[i_options] ); while( i_options-- ) free( (char*)ppsz_options[i_options] );
free( ppsz_options ); FREENULL( ppsz_options );
ppsz_options = NULL; i_options = 0; i_options = 0;
free( psz_name ); FREENULL( psz_name );
psz_name = NULL; FREENULL( psz_artist );
free( psz_artist ); FREENULL( psz_album_art );
psz_artist = NULL;
free( psz_album_art );
psz_album_art = NULL;
i_parsed_duration = 0; i_parsed_duration = 0;
i_duration = -1; i_duration = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment