Mercurial > mplayer.hg
changeset 35546:cd2c85083fdd
Reset playlist to first item after playback has stopped.
This gives a playlist the same behaviour like playing a CD/VCD/DVD.
Reported by Hans-Dieter Kosch, hdkosch kabelbw de.
author | ib |
---|---|
date | Sun, 09 Dec 2012 16:49:03 +0000 |
parents | d83d2bd5f365 |
children | fb9968ad466e |
files | gui/interface.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Sun Dec 09 14:49:11 2012 +0000 +++ b/gui/interface.c Sun Dec 09 16:49:03 2012 +0000 @@ -836,15 +836,22 @@ filename = NULL; - if (!isPlaylistStreamtype) guiInfo.Track = (guiInfo.StreamType == STREAMTYPE_VCD ? 2 : 1); if (guiInfo.Chapter) guiInfo.Chapter = 1; if (guiInfo.Angle) guiInfo.Angle = 1; - if (isPlaylistStreamtype && !listMgr(PLAYLIST_ITEM_GET_CURR, 0)) + if (isPlaylistStreamtype) { + if (!listMgr(PLAYLIST_ITEM_GET_CURR, 0)) uiUnsetFile(); + else { + plItem *curr; + + curr = listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0)); + uiSetFile(curr->path, curr->name, STREAMTYPE_FILE); + } + } guiInfo.ElapsedTime = 0; guiInfo.Position = 0;