Matroska reader: don't buffer more than 128 MB for audio/video tracks

Fixes #2304.
This commit is contained in:
Moritz Bunkus 2018-05-14 14:49:46 +02:00
parent 0b9b1228a3
commit 54e9f3b3de
2 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,9 @@
regular sub-expressions for ISO 639-1 codes could match on empty strings,
too, causing matches in wrong places and hence no language being recognized
in certain situations. Fixes #2298.
* mkvmerge: Matroska reader: fixed mkvmerge buffering the whole file if a
video track is multiplexed that consists of only one or a few frames. Fixes
#2304.
# Version 23.0.0 "The Bride Said No" 2018-05-02

View File

@ -2233,7 +2233,7 @@ kax_reader_c::read(generic_packetizer_c *requested_ptzr,
auto requested_ptzr_track = m_ptzr_to_track_map[requested_ptzr];
if ( !requested_ptzr_track
|| (!force && ('a' != requested_ptzr_track->type) && ('v' != requested_ptzr_track->type))
|| ( force && (128 * 1024 * 1024 >= num_queued_bytes)))
|| (128 * 1024 * 1024 < num_queued_bytes))
return FILE_STATUS_HOLDING;
}