demux_mkv: warn against some other aspects of mismatching codec data

Such files violate the specification. Unfortunately, I could not test
whether it really works correctly, since I don't have a sample at hand
that is not broken in this regard.
This commit is contained in:
wm4 2020-08-16 01:00:29 +02:00
parent 112d2a2c50
commit d6bf3880d7
1 changed files with 5 additions and 0 deletions

View File

@ -494,6 +494,11 @@ static void check_track_compatibility(struct tl_ctx *tl, struct demuxer *mainsrc
// match (though mpv's implementation doesn't care).
if (strcmp(s->codec->codec, m->codec->codec) != 0)
MP_WARN(tl, "Timeline segments have mismatching codec.\n");
if (s->codec->extradata_size != m->codec->extradata_size ||
(s->codec->extradata_size &&
memcmp(s->codec->extradata, m->codec->extradata,
s->codec->extradata_size) != 0))
MP_WARN(tl, "Timeline segments have mismatching codec info.\n");
} else {
MP_WARN(tl, "Source %s lacks %s stream with TID=%d, which "
"is present in the ordered chapters main "