diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2018-10-15 17:59:13 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2018-10-29 19:50:34 +0100 |
commit | 20b91a83d3078eeabc02a4d214f6d44c64282f89 (patch) | |
tree | 00a182ef2240e6edc5a88ae4cf037479f5fa042c /lib/rbcodec/codecs/shorten.c | |
parent | 0120ecd651a2ff3f8e202a704d6e73b705cf81d0 (diff) | |
download | rockbox-20b91a83d3078eeabc02a4d214f6d44c64282f89.tar.gz rockbox-20b91a83d3078eeabc02a4d214f6d44c64282f89.zip |
codecs: Fix elapsed time calculation for large files
In particular, this solves seeking glitches seen in ~6 hr mp3 files.
(Patch taken from Igor Poretsky's tree)
Change-Id: Id65b6726146b6d2d1a223e90b88e401d1b2d597a
Diffstat (limited to 'lib/rbcodec/codecs/shorten.c')
-rw-r--r-- | lib/rbcodec/codecs/shorten.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/shorten.c b/lib/rbcodec/codecs/shorten.c index f171b69a64..e8d845c18b 100644 --- a/lib/rbcodec/codecs/shorten.c +++ b/lib/rbcodec/codecs/shorten.c | |||
@@ -145,7 +145,7 @@ seek_start: | |||
145 | 145 | ||
146 | /* Update the elapsed-time indicator */ | 146 | /* Update the elapsed-time indicator */ |
147 | samplesdone += nsamples; | 147 | samplesdone += nsamples; |
148 | elapsedtime = (samplesdone*10) / (sc.sample_rate/100); | 148 | elapsedtime = samplesdone*1000LL/sc.sample_rate; |
149 | ci->set_elapsed(elapsedtime); | 149 | ci->set_elapsed(elapsedtime); |
150 | } | 150 | } |
151 | 151 | ||