summaryrefslogtreecommitdiffstats
path: root/lib/rbcodec/codecs/mpa.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/mpa.c')
-rw-r--r--lib/rbcodec/codecs/mpa.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/mpa.c b/lib/rbcodec/codecs/mpa.c
index 5fdcb38da8..2c651d11b0 100644
--- a/lib/rbcodec/codecs/mpa.c
+++ b/lib/rbcodec/codecs/mpa.c
@@ -462,7 +462,14 @@ enum codec_status codec_run(void)
}
else {
ci->seek_buffer(ci->id3->offset);
- set_elapsed(ci->id3);
+ if (ci->id3->elapsed && ci->id3->elapsed < ci->id3->length)
+ {
+ ci->set_elapsed(ci->id3->elapsed);
+ }
+ else
+ {
+ set_elapsed(ci->id3);
+ }
}
}
else if (ci->id3->elapsed)