From 71d6380df40ec40320cd6c86e136bd5667698f39 Mon Sep 17 00:00:00 2001 From: jwcullen Date: Wed, 20 Nov 2024 17:35:04 -0500 Subject: [PATCH] Update logging when flushing write buffer. It is misleading or strange to report flushing 0 bytes left. PiperOrigin-RevId: 698524519 --- iamf/common/write_bit_buffer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iamf/common/write_bit_buffer.cc b/iamf/common/write_bit_buffer.cc index 073ab88..8defa20 100644 --- a/iamf/common/write_bit_buffer.cc +++ b/iamf/common/write_bit_buffer.cc @@ -250,7 +250,9 @@ absl::Status WriteBitBuffer::FlushAndWriteToFile( RETURN_IF_NOT_OK(WriteBufferToFile(bit_buffer_, *output_file)); } - LOG_EVERY_POW_2(INFO) << "Flushing " << bit_offset_ / 8 << " bytes"; + if (bit_offset_ > 0) { + LOG_EVERY_POW_2(INFO) << "Flushing " << bit_offset_ / 8 << " bytes"; + } Reset(); return absl::OkStatus(); }