[vlc-commits] commit: lua_playlist: Use the title of the item and fallback to the name if this one is empty ( better for some sd like icecast). ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Thu Apr 8 15:21:29 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Apr 8 15:20:00 2010 +0200| [a63042d4252aac81a1d05c833e0f061d6a601a0e] | committer: Rémi Duraffort
lua_playlist: Use the title of the item and fallback to the name if this one is empty (better for some sd like icecast).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a63042d4252aac81a1d05c833e0f061d6a601a0e
---
modules/misc/lua/libs/playlist.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/misc/lua/libs/playlist.c b/modules/misc/lua/libs/playlist.c
index 55de023..df0f15c 100644
--- a/modules/misc/lua/libs/playlist.c
+++ b/modules/misc/lua/libs/playlist.c
@@ -160,7 +160,6 @@ static int vlclua_playlist_enqueue( lua_State *L )
return 1;
}
-static void push_playlist_item( lua_State *L, playlist_item_t *p_item );
static void push_playlist_item( lua_State *L, playlist_item_t *p_item )
{
input_item_t *p_input = p_item->p_input;
@@ -186,7 +185,9 @@ static void push_playlist_item( lua_State *L, playlist_item_t *p_item )
lua_setfield( L, -2, "flags" );
if( p_input )
{
- lua_pushstring( L, p_input->psz_name );
+ char *psz_name = input_item_GetTitleFbName( p_input );
+ lua_pushstring( L, psz_name );
+ free( psz_name );
lua_setfield( L, -2, "name" );
lua_pushstring( L, p_input->psz_uri );
lua_setfield( L, -2, "path" );
More information about the vlc-commits
mailing list