--- firmware\mpeg.2 Sun Aug 19 23:43:19 2007 +++ firmware\mpeg.c Sun Aug 19 23:42:45 2007 @@ -149,6 +149,7 @@ static int mpeg_file; static bool play_pending; /* We are about to start playing */ +static bool play_pending_track_change; /* When starting play we're starting a new file */ static bool filling; /* We are filling the buffer with data from disk */ static bool dma_underrun; /* True when the DMA has stopped because of slow disk reading (read error, shaking) */ @@ -1160,8 +1161,11 @@ if (play_pending) /* don't do this when recovering from DMA underrun */ { generate_postbuffer_events(); /* signal first track as buffered */ - if (track_changed_callback) + if (play_pending_track_change) { + play_pending_track_change = false; + if(track_changed_callback) track_changed_callback(audio_current_track()); + } play_pending = false; } playing = true; @@ -1320,6 +1324,7 @@ /* Tell the file loading code that we want to start playing as soon as we have some data */ play_pending = true; + play_pending_track_change = true; update_playlist(); current_track_counter++; @@ -1423,6 +1428,7 @@ /* Tell the file loading code that we want to start playing as soon as we have some data */ play_pending = true; + play_pending_track_change = true; update_playlist(); current_track_counter++; @@ -1454,6 +1460,7 @@ /* Tell the file loading code that we want to start playing as soon as we have some data */ play_pending = true; + play_pending_track_change = true; update_playlist(); current_track_counter++;