Commit 09a188bf authored by Max Kellermann's avatar Max Kellermann

input/InputStream: add method Skip()

parent 10f08685
...@@ -100,6 +100,13 @@ InputStream::LockSeek(offset_type _offset, Error &error) ...@@ -100,6 +100,13 @@ InputStream::LockSeek(offset_type _offset, Error &error)
return Seek(_offset, error); return Seek(_offset, error);
} }
bool
InputStream::LockSkip(offset_type _offset, Error &error)
{
const ScopeLock protect(mutex);
return Skip(_offset, error);
}
Tag * Tag *
InputStream::ReadTag() InputStream::ReadTag()
{ {
......
...@@ -295,6 +295,15 @@ public: ...@@ -295,6 +295,15 @@ public:
} }
/** /**
* Skip input bytes.
*/
bool Skip(offset_type _offset, Error &error) {
return Seek(GetOffset() + _offset, error);
}
bool LockSkip(offset_type _offset, Error &error);
/**
* Returns true if the stream has reached end-of-file. * Returns true if the stream has reached end-of-file.
* *
* The caller must lock the mutex. * The caller must lock the mutex.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment