mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 21:06:00 +00:00
demux_mkv: store streams sequentially in demuxer->[avs]_streams
demux_mkv used the Matroska TrackNumber as the array offset in demuxer stream lists. The TrackNumber entry stored in the file can be an arbitrary 64-bit value, and some of the code could try reading from the arrays with that offset, causing a crash if the file had insane values. Fill the arrays sequentially instead. Also add some checks to make the handling of too high stream counts more robust.
This commit is contained in:
parent
90bedd0b87
commit
fc39d48465