diff --git a/src/input/InputStream.cxx b/src/input/InputStream.cxx index bd593bc29..8ea3ef560 100644 --- a/src/input/InputStream.cxx +++ b/src/input/InputStream.cxx @@ -100,6 +100,13 @@ InputStream::LockSeek(offset_type _offset, Error &error) return Seek(_offset, error); } +bool +InputStream::LockSkip(offset_type _offset, Error &error) +{ + const ScopeLock protect(mutex); + return Skip(_offset, error); +} + Tag * InputStream::ReadTag() { diff --git a/src/input/InputStream.hxx b/src/input/InputStream.hxx index 458947eb4..af010e2e1 100644 --- a/src/input/InputStream.hxx +++ b/src/input/InputStream.hxx @@ -294,6 +294,15 @@ public: return LockSeek(0, error); } + /** + * 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. *