[vlc-commits] ncurses: use make_URI() when adding item
Pierre Ynard
git at videolan.org
Fri Jan 28 02:07:35 CET 2011
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Fri Jan 28 02:07:08 2011 +0100| [32d207e47075ce211efd6074b5d574111a529362] | committer: Pierre Ynard
ncurses: use make_URI() when adding item
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32d207e47075ce211efd6074b5d574111a529362
---
modules/gui/ncurses.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 2645eac..33087e0 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1516,6 +1516,13 @@ static void HandleEditBoxKey(intf_thread_t *p_intf, int key, int box)
}
else if (len)
{
+ char *psz_uri = make_URI(p_sys->psz_open_chain, NULL);
+ if (psz_uri == NULL)
+ {
+ p_sys->i_box_type = BOX_PLAYLIST;
+ return;
+ }
+
playlist_t *p_playlist = pl_Get(p_intf);
playlist_item_t *p_parent = p_sys->p_node, *p_current;
@@ -1532,11 +1539,12 @@ static void HandleEditBoxKey(intf_thread_t *p_intf, int key, int box)
p_parent = p_parent->p_parent;
PL_UNLOCK;
- playlist_Add(p_playlist, p_sys->psz_open_chain, NULL,
+ playlist_Add(p_playlist, psz_uri, NULL,
PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END,
p_parent->p_input == p_playlist->p_local_onelevel->p_input,
false);
+ free(psz_uri);
p_sys->b_plidx_follow = true;
}
p_sys->i_box_type = BOX_PLAYLIST;
More information about the vlc-commits
mailing list