summaryrefslogtreecommitdiff
path: root/src/codecs/source_buffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codecs/source_buffer.cpp')
-rw-r--r--src/codecs/source_buffer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/codecs/source_buffer.cpp b/src/codecs/source_buffer.cpp
index 3d06afa0..8e40ba42 100644
--- a/src/codecs/source_buffer.cpp
+++ b/src/codecs/source_buffer.cpp
@@ -18,7 +18,8 @@
namespace codecs {
[[maybe_unused]] static constexpr char kTag[] = "dec_buf";
-static constexpr size_t kBufferSize = 1024 * 8;
+static constexpr size_t kBufferSize = 1024 * 128;
+static constexpr size_t kReadThreshold = 1024 * 8;
SourceBuffer::SourceBuffer()
: buffer_(reinterpret_cast<std::byte*>(
@@ -34,7 +35,7 @@ SourceBuffer::~SourceBuffer() {
}
auto SourceBuffer::Refill(IStream* src) -> bool {
- if (bytes_in_buffer_ == buffer_.size_bytes()) {
+ if (bytes_in_buffer_ > kReadThreshold) {
return false;
}
bool eof = false;