mirror of https://github.com/mpv-player/mpv
demux_mkv: allow 0 sized packets
Fixes some obscure sample that uses fixed size laces with 0-sized lace size. Some broken shit. (Maybe the decoder wouldn't care about these packets, but the demuxer attempted to resync after these packet reading errors, even though they were perfectly recoverable. But I don't care enough about this.) Sample link: https://samples.ffmpeg.org/Matroska/switzler084d_dl.mkv
This commit is contained in:
parent
7334d93b30
commit
e598b19dad
|
@ -2515,7 +2515,7 @@ static int read_block(demuxer_t *demuxer, int64_t end, struct block_info *block)
|
|||
uint8_t c2 = stream_read_char(s);
|
||||
time = c1 << 8 | c2;
|
||||
|
||||
if (stream_tell(s) + 2 >= endpos)
|
||||
if (stream_tell(s) + 2 > endpos)
|
||||
goto exit;
|
||||
uint8_t header_flags = stream_read_char(s);
|
||||
|
||||
|
|
Loading…
Reference in New Issue