Mercurial > mplayer.hg
comparison gui/ui/actions.c @ 34690:eeb74ce15120
Fix bug with playlist playback.
When <stop> is pressed and you shift to another track and press <play>,
the track is played twice (before advancing to the next element in the
list).
Reported by drake ch, drake.ch hotmail com.
When shifting to another track, set information that at the end of
playback of the current track the next track to be played shall not be
determined (!uiGotoTheNext) only if currently playing. That is because
the track shifting function itself (which already has determined the
next track to be played) will end the playback of the current track (and
start the next one) only if currently playing.
If not playing, the next track to be played after the end of playback of
the current track (determined by the track shifting function) must be
determined again (uiGotoTheNext).
author | ib |
---|---|
date | Mon, 27 Feb 2012 22:09:34 +0000 |
parents | b03481253518 |
children | ac6b38cd0d45 |
comparison
equal
deleted
inserted
replaced
34689:e92fb6cc0836 | 34690:eeb74ce15120 |
---|---|
256 | 256 |
257 curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0); | 257 curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0); |
258 | 258 |
259 if (curr) { | 259 if (curr) { |
260 uiSetFileName(curr->path, curr->name, STREAMTYPE_FILE); | 260 uiSetFileName(curr->path, curr->name, STREAMTYPE_FILE); |
261 uiGotoTheNext = 0; | 261 uiGotoTheNext = (guiInfo.Playing ? 0 : 1); |
262 break; | 262 break; |
263 } | 263 } |
264 | 264 |
265 return; | 265 return; |
266 } | 266 } |
312 | 312 |
313 prev = listMgr(PLAYLIST_ITEM_GET_PREV, 0); | 313 prev = listMgr(PLAYLIST_ITEM_GET_PREV, 0); |
314 | 314 |
315 if (prev) { | 315 if (prev) { |
316 uiSetFileName(prev->path, prev->name, STREAMTYPE_FILE); | 316 uiSetFileName(prev->path, prev->name, STREAMTYPE_FILE); |
317 uiGotoTheNext = 0; | 317 uiGotoTheNext = (guiInfo.Playing ? 0 : 1); |
318 guiInfo.Track--; | 318 guiInfo.Track--; |
319 break; | 319 break; |
320 } | 320 } |
321 | 321 |
322 return; | 322 return; |
373 | 373 |
374 next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0); | 374 next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0); |
375 | 375 |
376 if (next) { | 376 if (next) { |
377 uiSetFileName(next->path, next->name, STREAMTYPE_FILE); | 377 uiSetFileName(next->path, next->name, STREAMTYPE_FILE); |
378 uiGotoTheNext = 0; | 378 uiGotoTheNext = (guiInfo.Playing ? 0 : 1); |
379 guiInfo.Track++; | 379 guiInfo.Track++; |
380 break; | 380 break; |
381 } | 381 } |
382 | 382 |
383 return; | 383 return; |