diff options
Diffstat (limited to 'src/audio/stream_info.cpp')
| -rw-r--r-- | src/audio/stream_info.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/audio/stream_info.cpp b/src/audio/stream_info.cpp index 2337b3a3..748cb9ef 100644 --- a/src/audio/stream_info.cpp +++ b/src/audio/stream_info.cpp @@ -30,6 +30,9 @@ void InputStream::consume(std::size_t bytes) const { void InputStream::mark_consumer_finished() const { raw_->info->is_consumer_finished = true; + if (is_producer_finished()) { + raw_->info->format = std::monostate(); + } } bool InputStream::is_producer_finished() const { @@ -71,6 +74,9 @@ cpp::span<std::byte> OutputStream::data() const { void OutputStream::mark_producer_finished() const { raw_->info->is_producer_finished = true; + if (is_consumer_finished()) { + raw_->info->format = std::monostate(); + } } bool OutputStream::is_consumer_finished() const { |
