diff options
Diffstat (limited to 'src/audio/stream_info.cpp')
| -rw-r--r-- | src/audio/stream_info.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio/stream_info.cpp b/src/audio/stream_info.cpp index ee85f35d..8fc31530 100644 --- a/src/audio/stream_info.cpp +++ b/src/audio/stream_info.cpp @@ -22,7 +22,8 @@ namespace audio { void InputStream::consume(std::size_t bytes) const { assert(raw_->info->bytes_in_stream >= bytes); - auto new_data = raw_->data.subspan(bytes); + auto new_data = + raw_->data.subspan(bytes, raw_->info->bytes_in_stream - bytes); std::move(new_data.begin(), new_data.end(), raw_->data.begin()); raw_->info->bytes_in_stream = new_data.size_bytes(); } |
