Revert to calling playlist_next() in check_new_track() as in SVN.
authorNicolas Pennequin <nicolas@nicolas-laptop.(none)>
Wed, 24 Oct 2007 23:26:18 +0000 (25 01:26 +0200)
committerlearman <learman@a1c6a512-1295-4272-9138-f99709370657>
Thu, 25 Oct 2007 19:18:20 +0000 (25 19:18 +0000)
Calling playlist_next() on PCM track change was the cause of the auto
change directory bug. playlist_next() needs to be called to provide the
new playlist. If we call it on the PCM track change, it's too late.

The downside of reverting to the SVN behaviour is that the playlist index
displayed in the WPS and the position in the playlist viewer get updated
too early. Until a better solution is found, the same behaviour as SVN
is acceptable.

apps/playback.c

index 41e9909..eb81f0b 100644 (file)
@@ -2767,7 +2767,7 @@ static int audio_check_new_track(void)
     /* Update the playlist */
     last_peek_offset -= ci.new_track;
 
-    if (!automatic_skip && playlist_next(ci.new_track) < 0)
+    if (playlist_next(ci.new_track) < 0)
     {
         LOGFQUEUE("audio >|= codec Q_CODEC_REQUEST_FAILED");
         return Q_CODEC_REQUEST_FAILED;
@@ -3270,7 +3270,6 @@ static void audio_thread(void)
                 LOGFQUEUE("audio < Q_AUDIO_TRACK_CHANGED");
                 if (automatic_skip)
                 {
-                    playlist_next(-wps_offset);
                     wps_offset = 0;
                     automatic_skip = false;
                     prevtrack_id3.path[0] = 0;