diff --git a/NEWS.md b/NEWS.md index c0b6f64be..a47a205d7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -63,6 +63,8 @@ * mkvmerge: HEVC/H.265: mkvextract will now normalize the placement of VPS, SPS and PPS NALUs. Each key frame is prefixed with exactly one copy of the currently active parameter sets. +* mkvmerge: AAC reader: fixed mkvmerge aborting to read AAC files bigger than + 2 GB with a message about not being able to allocate memory. Fixes #3059. ## Build system changes diff --git a/src/input/r_aac.cpp b/src/input/r_aac.cpp index c0afe7696..bbec79f1a 100644 --- a/src/input/r_aac.cpp +++ b/src/input/r_aac.cpp @@ -105,9 +105,9 @@ aac_reader_c::create_packetizer(int64_t) { file_status_e aac_reader_c::read(generic_packetizer_c *, bool) { - int remaining_bytes = m_size - m_in->getFilePointer(); - auto read_len = std::min(m_chunk->get_size(), remaining_bytes); - int num_read = m_in->read(m_chunk, read_len); + auto remaining_bytes = m_size - m_in->getFilePointer(); + auto read_len = std::min(m_chunk->get_size(), remaining_bytes); + auto num_read = m_in->read(m_chunk, read_len); if (0 < num_read) { m_parser.add_bytes(m_chunk->get_buffer(), num_read);