lib/xiph/OggVisitor: update the OggStreamState offset

This commit is contained in:
Max Kellermann 2020-01-27 20:48:49 +01:00
parent 7e3eaa5921
commit e01bbad7bb
3 changed files with 10 additions and 3 deletions

View File

@ -72,7 +72,7 @@ inline void
OggDecoder::SeekByte(offset_type offset)
{
input_stream.LockSeek(offset);
PostSeek();
PostSeek(offset);
}
void

View File

@ -94,9 +94,10 @@ OggVisitor::Visit()
}
void
OggVisitor::PostSeek()
OggVisitor::PostSeek(uint64_t offset)
{
sync.Reset();
sync.SetOffset(offset);
/* reset the stream to clear any previous partial packet
data */

View File

@ -53,12 +53,18 @@ public:
return stream.GetSerialNo();
}
uint64_t GetStartOffset() const noexcept {
return sync.GetStartOffset();
}
void Visit();
/**
* Call this method after seeking the #Reader.
*
* @param offset the current #Reader offset
*/
void PostSeek();
void PostSeek(uint64_t offset);
private:
void EndStream();