realign to page on sync loss
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6645 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
16fe6dd90f
commit
6db6a6824b
@ -155,6 +155,7 @@ OggSeekable::ReadPage(ogg_page * page, int read_size)
|
||||
}
|
||||
BAutolock autolock(fPositionLock);
|
||||
// align to page boundary
|
||||
align:
|
||||
int offset;
|
||||
while ((offset = ogg_sync_pageseek(&fSync, page)) <= 0) {
|
||||
if (offset == 0) {
|
||||
@ -204,9 +205,8 @@ OggSeekable::ReadPage(ogg_page * page, int read_size)
|
||||
}
|
||||
if (result == -1) {
|
||||
TRACE("OggSeekable::ReadPage (%llu)\n", fPosition);
|
||||
TRACE("OggSeekable::ReadPage: ogg_sync_pageout: not synced!\n");
|
||||
debugger("lost sync");
|
||||
return B_ERROR;
|
||||
TRACE("OggSeekable::ReadPage: ogg_sync_pageout: not synced... attempt resync\n");
|
||||
goto align;
|
||||
}
|
||||
if (ogg_page_version(page) != 0) {
|
||||
TRACE("OggSeekable::ReadPage (%llu)\n", fPosition);
|
||||
|
Loading…
Reference in New Issue
Block a user