[vlc-commits] goom: simplify.
Rémi Duraffort
git at videolan.org
Sun Jun 19 11:41:14 CEST 2011
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jun 19 11:41:00 2011 +0200| [fee1ca0ca15c5bf6d86ec90694111bab8aafc886] | committer: Rémi Duraffort
goom: simplify.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fee1ca0ca15c5bf6d86ec90694111bab8aafc886
---
modules/visualization/goom.c | 23 +++++------------------
1 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c
index 4d5ea6c..c4ba551 100644
--- a/modules/visualization/goom.c
+++ b/modules/visualization/goom.c
@@ -406,24 +406,11 @@ static void Close( vlc_object_t *p_this )
static char *TitleGet( vlc_object_t *p_this )
{
input_thread_t *p_input = playlist_CurrentInput( pl_Get( p_this ) );
- if( !p_input )
- return NULL;
-
- char *psz_title = input_item_GetTitle( input_GetItem( p_input ) );
- if( EMPTY_STR( psz_title ) )
+ if( p_input )
{
- free( psz_title );
-
- char *psz_uri = input_item_GetURI( input_GetItem( p_input ) );
- const char *psz = strrchr( psz_uri, '/' );
- if( psz )
- {
- psz_title = strdup( psz + 1 );
- free( psz_uri );
- }
- else
- psz_title = psz_uri;
+ char *psz_title = input_item_GetTitleFbName( input_GetItem( p_input ) );
+ vlc_object_release( p_input );
+ return psz_title;
}
- vlc_object_release( p_input );
- return psz_title;
+ return NULL;
}
More information about the vlc-commits
mailing list