summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-14 02:39:11 +0200
committerwm4 <wm4@nowhere>2013-04-20 23:28:23 +0200
commitf989b6081b38d4b05e38ec879e0364694eb08152 (patch)
tree72f6d989b918f48cab22d4ad482356e24ad05380
parent5d562c5ef299873d104be01ff198d1befda36392 (diff)
downloadmpv-f989b6081b38d4b05e38ec879e0364694eb08152.tar.bz2
mpv-f989b6081b38d4b05e38ec879e0364694eb08152.tar.xz
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.
-rw-r--r--demux/demux_mkv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index addc8dcdcb..00f5a1a722 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -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 "