forked from len0rd/rockbox
Codecs: mpa: Use both time and offset when resuming files
The supplied time may be more accurate than the calculated time from the bitrate (can be quite inaccurate for long vbr files and even for cbr due to padding) Change-Id: I1f8291eab45fbd91a161b51776c391a0f7886a5c
This commit is contained in:
parent
1122cae028
commit
be16edc94b
1 changed files with 8 additions and 1 deletions
|
@ -462,9 +462,16 @@ enum codec_status codec_run(void)
|
|||
}
|
||||
else {
|
||||
ci->seek_buffer(ci->id3->offset);
|
||||
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)
|
||||
/* Have elapsed time but not offset */
|
||||
seek_by_time(&samplesdone, current_frequency, ci->id3->elapsed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue