mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
AAC reader: use 64-bit integer types in file size related calculations
Otherwise files bigger than 2 GB result in negative numbers… Fixes #3059.
This commit is contained in:
parent
3dec8ccbc1
commit
17e0c11909
2
NEWS.md
2
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
|
||||
|
||||
|
@ -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<int64_t>(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);
|
||||
|
Loading…
Reference in New Issue
Block a user