Otherwise a situation may arise where a file still in a non-finished
state going into the force pull function and coming out of it in a
finished state. However, mkvmerge has to do some work on such a
• housekeeping (decrease number of unfinished packetizers for later
decisions whether or not a file has been read)
• establishing deferred connections when appending
In such a case mkvmerge entered an endless loop.
This was a regression introduced with commit
e06d80f as a fix to #1774.
The fix for #1774 caused a regression for sparse tracks in file types
where access to arbitrary packets is not possible (such as
Matroska). The change was to always force-pull a packetizer if all the
packetizers in a file are held.
The drawback is that the packetizer for sparse tracks (e.g. forced
subtitles with few if any entries) was called so often in force mode
that readers had to buffer the whole file content up to the point
where a packet for the sparse track was found. The result was huge
For completely empty tracks this resulted in an endless loop.
This fix limits the number of enqueued bytes for the Matroska reader
to 128 MB by ignoring force mode in such a case.