summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-06 17:12:58 +0100
committerwm4 <wm4@nowhere>2017-11-06 17:12:58 +0100
commite598b19dad9638c2c108ac5f39df6573563b0691 (patch)
tree44c544805bbdb73f44705b27273f97c91696fbe1 /demux
parent7334d93b30bfff22d44b8355ccc480ed7442c2d5 (diff)
downloadmpv-e598b19dad9638c2c108ac5f39df6573563b0691.tar.bz2
mpv-e598b19dad9638c2c108ac5f39df6573563b0691.tar.xz
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
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_mkv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index e9fa70b823..5f3ec6d514 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -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);