Fix page switching right after an audio track seek.
This commit is contained in:
parent
11cb5a640f
commit
81b7ab9a0e
1 changed files with 2 additions and 0 deletions
|
@ -597,6 +597,7 @@ namespace Mist {
|
||||||
DEBUG_MSG(DLVL_DONTEVEN, "Loading track %u (next=%lu), %llu ms", nxt.tid, nxtKeyNum[nxt.tid], nxt.time);
|
DEBUG_MSG(DLVL_DONTEVEN, "Loading track %u (next=%lu), %llu ms", nxt.tid, nxtKeyNum[nxt.tid], nxt.time);
|
||||||
|
|
||||||
if (nxt.offset >= curPages[nxt.tid].len){
|
if (nxt.offset >= curPages[nxt.tid].len){
|
||||||
|
nxtKeyNum[nxt.tid] = getKeyForTime(nxt.tid, currentPacket.getTime());
|
||||||
loadPageForKey(nxt.tid, ++nxtKeyNum[nxt.tid]);
|
loadPageForKey(nxt.tid, ++nxtKeyNum[nxt.tid]);
|
||||||
nxt.offset = 0;
|
nxt.offset = 0;
|
||||||
if (curPages.count(nxt.tid) && curPages[nxt.tid].mapped){
|
if (curPages.count(nxt.tid) && curPages[nxt.tid].mapped){
|
||||||
|
@ -644,6 +645,7 @@ namespace Mist {
|
||||||
updateMeta();
|
updateMeta();
|
||||||
}else{
|
}else{
|
||||||
//if we're not live, we've simply reached the end of the page. Load the next key.
|
//if we're not live, we've simply reached the end of the page. Load the next key.
|
||||||
|
nxtKeyNum[nxt.tid] = getKeyForTime(nxt.tid, currentPacket.getTime());
|
||||||
loadPageForKey(nxt.tid, ++nxtKeyNum[nxt.tid]);
|
loadPageForKey(nxt.tid, ++nxtKeyNum[nxt.tid]);
|
||||||
nxt.offset = 0;
|
nxt.offset = 0;
|
||||||
if (curPages.count(nxt.tid) && curPages[nxt.tid].mapped){
|
if (curPages.count(nxt.tid) && curPages[nxt.tid].mapped){
|
||||||
|
|
Loading…
Add table
Reference in a new issue