mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00: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:
parent
5d562c5ef2
commit
f989b6081b
@ -1716,8 +1716,9 @@ static int demux_mkv_open(demuxer_t *demuxer)
|
|||||||
while (1) {
|
while (1) {
|
||||||
uint32_t id = ebml_read_id(s, NULL);
|
uint32_t id = ebml_read_id(s, NULL);
|
||||||
if (s->eof) {
|
if (s->eof) {
|
||||||
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "[mkv] Unexpected end of file\n");
|
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||||
return 0;
|
"[mkv] Unexpected end of file (no clusters found)\n");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (id == MATROSKA_ID_CLUSTER) {
|
if (id == MATROSKA_ID_CLUSTER) {
|
||||||
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] |+ found cluster, headers are "
|
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] |+ found cluster, headers are "
|
||||||
|
Loading…
Reference in New Issue
Block a user