Log the mismatching sizes when XING header mismatches real size

This commit is contained in:
Martchus 2023-05-18 00:37:59 +02:00
parent a5ab3ed1b2
commit 6eab8b8718
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,8 @@
#include "../exceptions.h"
#include "../mediaformat.h"
#include <c++utilities/conversion/stringbuilder.h>
#include <sstream>
using namespace std;
@ -69,7 +71,8 @@ void MpegAudioFrameStream::internalParseHeader(Diagnostics &diag, AbortableProgr
std::uint32_t xingSize = frame.xingBytesfield();
if (m_size && xingSize != m_size) {
diag.emplace_back(DiagLevel::Warning,
"Real length of MPEG audio frames is not in accordance with value provided by Xing header. The Xing header value will be used.",
argsToString("Real length of MPEG audio frames (", m_size, " byte) is not in accordance with value provided by Xing header (",
xingSize, " byte). The Xing header value will be used."),
context);
m_size = xingSize;
}