1
mirror of https://github.com/mpv-player/mpv synced 2025-01-20 21:07:29 +01:00

demux_mkv: don't terminate if there are no clusters

Matroska segment linking allows abusing Matroska files as playlists
without any actual video/audio/sub data, making files without any
clusters still useful for the frontend.
This commit is contained in:
wm4 2013-04-14 02:39:11 +02:00
parent 5d562c5ef2
commit f989b6081b

View File

@ -1716,8 +1716,9 @@ static int demux_mkv_open(demuxer_t *demuxer)
while (1) {
uint32_t id = ebml_read_id(s, NULL);
if (s->eof) {
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "[mkv] Unexpected end of file\n");
return 0;
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
"[mkv] Unexpected end of file (no clusters found)\n");
break;
}
if (id == MATROSKA_ID_CLUSTER) {
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] |+ found cluster, headers are "