input/buffered: fix bogus offset after Seek()
Instead of copying the offset from our `input`, copy the requested offset to our `offset` attribute. By the time Seek() finishes, our input's offset may have advanced already, having read some more data, thus giving us a bogus offset. This fixes spurious decoder failues (closes #320).
This commit is contained in:
parent
9263d6d07d
commit
c8e6f50d55
@ -85,7 +85,7 @@ BufferedInputStream::Seek(offset_type new_offset)
|
||||
if (seek_error)
|
||||
std::rethrow_exception(std::exchange(seek_error, {}));
|
||||
|
||||
offset = input->GetOffset();
|
||||
offset = new_offset;
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user