Mercurial > mplayer.hg
diff mplayer.c @ 9301:7841308ad250
this patch fixes latest bug, discovered by .so ... (relative filenames &
playlists) This affects also the gui (filenames with space)
patch by Fabian Franz <FabianFranz@gmx.de>
author | arpi |
---|---|
date | Thu, 06 Feb 2003 20:57:25 +0000 |
parents | 64b8c5a07c2c |
children | 1ec274153bec |
line wrap: on
line diff
--- a/mplayer.c Thu Feb 06 20:24:14 2003 +0000 +++ b/mplayer.c Thu Feb 06 20:57:25 2003 +0000 @@ -582,6 +582,8 @@ int playtree_add_playlist(play_tree_t* entry) { + play_tree_add_bpf(entry,filename); + #ifdef HAVE_NEW_GUI if (use_gui) { if (entry) { @@ -759,9 +761,22 @@ use_gui=0; } if (use_gui && playtree_iter){ + char* cwd; // Remove Playtree and Playtree-Iter from memory as its not used by gui play_tree_iter_free(playtree_iter); playtree_iter=NULL; + + if ((cwd=get_current_dir_name())) + { + cwd=(char*)realloc(cwd, strlen(cwd)+2); + if (cwd) + { + strcat(cwd, "/"); + // Prefix relative paths with current working directory + play_tree_add_bpf(playtree, cwd); + free(cwd); + } + } // Import initital playtree into gui import_initial_playtree_into_gui(playtree, mconfig, enqueue); }