summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2007-11-05 01:56:12 +0000
committerBrandon Low <lostlogic@rockbox.org>2007-11-05 01:56:12 +0000
commitd02b5c744e39ea87980f75ad172aaaf0fcb29252 (patch)
tree0e4ce0b6bbba1ab3f7158a742a6a97d5766c7465 /apps/playback.c
parent6be390f21091ac3438d4ddb7935d985f2e4286ab (diff)
Don't keep useless id3v2 or other leading tag data on the buffer, it could be large
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15465 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 5132bd629a..650a69bbed 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1803,7 +1803,7 @@ static bool codec_request_next_track_callback(void)
/* Seek to the beginning of the new track because if the struct mp3entry was
buffered, "elapsed" might not be zero (if the track has been played
already but not unbuffered) */
- codec_seek_buffer_callback(0);
+ codec_seek_buffer_callback(curtrack_id3.first_frame_offset);
/* Check if the next codec is the same file. */
if (prev_codectype == get_codec_base_type(curtrack_id3.codectype))
@@ -2441,6 +2441,9 @@ static bool audio_load_track(int offset, bool start_play)
logf("alt:%s", trackname);
+ if (!file_offset && track_id3->first_frame_offset)
+ file_offset = track_id3->first_frame_offset;
+
tracks[track_widx].audio_hid = bufopen(trackname, file_offset, type);
if (tracks[track_widx].audio_hid < 0)