lib/xiph/OggVisitor: update the OggStreamState offset
This commit is contained in:
parent
7e3eaa5921
commit
e01bbad7bb
@ -72,7 +72,7 @@ inline void
|
|||||||
OggDecoder::SeekByte(offset_type offset)
|
OggDecoder::SeekByte(offset_type offset)
|
||||||
{
|
{
|
||||||
input_stream.LockSeek(offset);
|
input_stream.LockSeek(offset);
|
||||||
PostSeek();
|
PostSeek(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -94,9 +94,10 @@ OggVisitor::Visit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OggVisitor::PostSeek()
|
OggVisitor::PostSeek(uint64_t offset)
|
||||||
{
|
{
|
||||||
sync.Reset();
|
sync.Reset();
|
||||||
|
sync.SetOffset(offset);
|
||||||
|
|
||||||
/* reset the stream to clear any previous partial packet
|
/* reset the stream to clear any previous partial packet
|
||||||
data */
|
data */
|
||||||
|
@ -53,12 +53,18 @@ public:
|
|||||||
return stream.GetSerialNo();
|
return stream.GetSerialNo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t GetStartOffset() const noexcept {
|
||||||
|
return sync.GetStartOffset();
|
||||||
|
}
|
||||||
|
|
||||||
void Visit();
|
void Visit();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this method after seeking the #Reader.
|
* Call this method after seeking the #Reader.
|
||||||
|
*
|
||||||
|
* @param offset the current #Reader offset
|
||||||
*/
|
*/
|
||||||
void PostSeek();
|
void PostSeek(uint64_t offset);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void EndStream();
|
void EndStream();
|
||||||
|
Loading…
Reference in New Issue
Block a user