Mercurial > mplayer.hg
changeset 35572:0827fa4c3401
While playing, allow extensive editing of the playlist without stopping.
If the current file is still present in the list after editing, playback
of the file (at adjusted position) seamlessly continues. Otherwise, or
during stop mode, playback starts with track 1 again - automatically in
playing mode, to be restarted by the user in stop mode.
Based on a patch by Hans-Dieter Kosch, hdkosch kabelbw de.
author | ib |
---|---|
date | Tue, 11 Dec 2012 14:51:17 +0000 |
parents | 29761b2b8cb0 |
children | af20559e55c9 |
files | gui/dialog/playlist.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/playlist.c Tue Dec 11 13:48:19 2012 +0000 +++ b/gui/dialog/playlist.c Tue Dec 11 14:51:17 2012 +0000 @@ -194,14 +194,13 @@ { case 1: // ok { - int pos = 0, i; + int i; plItem curr, * item, * old; item = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); if (item) { curr.path = gstrdup(item->path); curr.name = gstrdup(item->name); - pos = (int) listMgr( PLAYLIST_ITEM_GET_POS,item ); } else curr.path = curr.name = NULL; listMgr( PLAYLIST_DELETE,0 ); @@ -220,12 +219,13 @@ item = listMgr( PLAYLIST_GET,0 ); if ( item ) { - if ( guiInfo.Playing && curr.name && pos ) + if ( guiInfo.Playing && curr.name ) { old = listMgr( PLAYLIST_ITEM_FIND,&curr ); - if ( old && ( pos == (int) listMgr( PLAYLIST_ITEM_GET_POS,old ) ) ) + if ( old ) { listMgr( PLAYLIST_ITEM_SET_CURR,old ); + guiInfo.Track = (int) listMgr( PLAYLIST_ITEM_GET_POS,old ); item = NULL; } }