diff options
author | wm4 <wm4@nowhere> | 2020-08-16 01:00:29 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-08-16 01:00:29 +0200 |
commit | d6bf3880d74459103a39426275837ec0a1d48e54 (patch) | |
tree | 15ab9b967b385f8de0028657d601e1c182e7fcd6 /demux/demux_mkv_timeline.c | |
parent | 112d2a2c500682003798ae60fc6cd0d5dabbe174 (diff) | |
download | mpv-d6bf3880d74459103a39426275837ec0a1d48e54.tar.bz2 mpv-d6bf3880d74459103a39426275837ec0a1d48e54.tar.xz |
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.
Diffstat (limited to 'demux/demux_mkv_timeline.c')
-rw-r--r-- | demux/demux_mkv_timeline.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux_mkv_timeline.c b/demux/demux_mkv_timeline.c index 1062aa3685..0c23e27d25 100644 --- a/demux/demux_mkv_timeline.c +++ b/demux/demux_mkv_timeline.c @@ -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 " |