Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BufferStream now seeks forward on read

  • Loading branch information...
commit 7cd69d3c79bc986a4b6ab36bb3276985f2ebc798 1 parent bb366bd
@nikhilm authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/bufferstream.cc
View
8 src/bufferstream.cc
@@ -22,7 +22,9 @@ BufferStream::~BufferStream()
}
TagLib::ByteVector BufferStream::readBlock(TagLib::ulong length) {
- return TagLib::ByteVector(m_data, m_length).mid(m_offset, length);
+ long start = m_offset;
+ m_offset += length;
+ return TagLib::ByteVector(m_data, m_length).mid(start, length);
}
void BufferStream::writeBlock(const TagLib::ByteVector &data) {
@@ -54,8 +56,6 @@ void BufferStream::seek(long offset, TagLib::IOStream::Position p) {
}
void BufferStream::clear() {
- fprintf(stderr, "clear called aborting\n");
- abort();
}
long BufferStream::tell() const {
@@ -67,7 +67,7 @@ long BufferStream::length() {
}
void BufferStream::truncate(long length) {
- fprintf(stderr, "truncaled called aborting\n");
+ fprintf(stderr, "truncate called aborting\n");
abort();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.