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:
@@ -155,6 +155,7 @@ OggSeekable::ReadPage(ogg_page * page, int read_size)
|
|||||||
}
|
}
|
||||||
BAutolock autolock(fPositionLock);
|
BAutolock autolock(fPositionLock);
|
||||||
// align to page boundary
|
// align to page boundary
|
||||||
|
align:
|
||||||
int offset;
|
int offset;
|
||||||
while ((offset = ogg_sync_pageseek(&fSync, page)) <= 0) {
|
while ((offset = ogg_sync_pageseek(&fSync, page)) <= 0) {
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
@@ -204,9 +205,8 @@ OggSeekable::ReadPage(ogg_page * page, int read_size)
|
|||||||
}
|
}
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
TRACE("OggSeekable::ReadPage (%llu)\n", fPosition);
|
TRACE("OggSeekable::ReadPage (%llu)\n", fPosition);
|
||||||
TRACE("OggSeekable::ReadPage: ogg_sync_pageout: not synced!\n");
|
TRACE("OggSeekable::ReadPage: ogg_sync_pageout: not synced... attempt resync\n");
|
||||||
debugger("lost sync");
|
goto align;
|
||||||
return B_ERROR;
|
|
||||||
}
|
}
|
||||||
if (ogg_page_version(page) != 0) {
|
if (ogg_page_version(page) != 0) {
|
||||||
TRACE("OggSeekable::ReadPage (%llu)\n", fPosition);
|
TRACE("OggSeekable::ReadPage (%llu)\n", fPosition);
|
||||||
|
|||||||
Reference in New Issue
Block a user