mirror of
https://github.com/mpv-player/mpv
synced 2025-01-29 19:22:48 +00:00
demux_mkv: don't stop playback on non-Cluster elements
The main demuxing code signaled EOF and stopped playback if it hit a top-level element other than Cluster. There are files with other elements between Cluster ones, at least repeated copies of Track headers. Change the code to skip any non-Cluster element and only stop searching on real file EOF.
This commit is contained in:
parent
d8a6af2980
commit
298808cddc
@ -2771,8 +2771,11 @@ static int demux_mkv_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
|
||||
}
|
||||
}
|
||||
|
||||
if (ebml_read_id(s, &il) != MATROSKA_ID_CLUSTER)
|
||||
return 0;
|
||||
while (ebml_read_id(s, &il) != MATROSKA_ID_CLUSTER) {
|
||||
ebml_read_skip(s, NULL);
|
||||
if (s->eof)
|
||||
return 0;
|
||||
}
|
||||
mkv_d->cluster_start = stream_tell(s) - il;
|
||||
mkv_d->cluster_size = ebml_read_length(s, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user