aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-06-03 20:59:47 +0200
committerSven Gothel <[email protected]>2022-06-03 20:59:47 +0200
commit4239b2623dc979c10eeeda32467d20bd04363a3d (patch)
treeff621e331c972596df74e63410683abe55a331cd
parent1306f71647f8a554f09a6e230329208c318933fb (diff)
Fix ByteInStream_Recorder::start_recording(): Always reset m_buffer, regardless whether its recording or not.
-rw-r--r--src/byte_stream.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/byte_stream.cpp b/src/byte_stream.cpp
index d43bc07..81ca200 100644
--- a/src/byte_stream.cpp
+++ b/src/byte_stream.cpp
@@ -467,9 +467,7 @@ void ByteInStream_Recorder::close() noexcept {
}
void ByteInStream_Recorder::start_recording() noexcept {
- if( is_recording() ) {
- m_buffer.resize(0);
- }
+ m_buffer.resize(0);
m_rec_offset = m_bytes_consumed;
m_is_recording = true;
}