diff options
Diffstat (limited to 'apps/codecs/mpa.c')
-rw-r--r-- | apps/codecs/mpa.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index d5b4d02889..f248744c50 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c | |||
@@ -130,13 +130,14 @@ static int get_file_pos(int newtime) | |||
130 | return -1; | 130 | return -1; |
131 | } | 131 | } |
132 | 132 | ||
133 | pos += id3->first_frame_offset; | ||
134 | |||
135 | /* Don't seek right to the end of the file so that we can | 133 | /* Don't seek right to the end of the file so that we can |
136 | transition properly to the next song */ | 134 | transition properly to the next song */ |
137 | if (pos >= (int)(id3->filesize - id3->id3v1len)) | 135 | if (pos >= (int)(id3->filesize - id3->id3v1len)) |
138 | pos = id3->filesize - id3->id3v1len - 1; | 136 | pos = id3->filesize - id3->id3v1len - 1; |
139 | 137 | ||
138 | /* id3->filesize excludes id3->first_frame_offset, so add it now */ | ||
139 | pos += id3->first_frame_offset; | ||
140 | |||
140 | return pos; | 141 | return pos; |
141 | } | 142 | } |
142 | 143 | ||
@@ -492,7 +493,7 @@ next_track: | |||
492 | } | 493 | } |
493 | 494 | ||
494 | samplesdone += framelength; | 495 | samplesdone += framelength; |
495 | ci->set_elapsed(samplesdone / (current_frequency / 1000)); | 496 | ci->set_elapsed((samplesdone * 1000) / current_frequency); |
496 | } | 497 | } |
497 | 498 | ||
498 | /* wait for synth idle - MT only*/ | 499 | /* wait for synth idle - MT only*/ |