mkvmuxer: Set doctype to matroska when muxing non-WebM codecs.
Also, add some constants for WebVTT codec ID strings so they won't cause doctype to incorrectly change to matroska. Change-Id: I4740a3e45b28a22e462601b9ce051aa01817dace
This commit is contained in:
@@ -723,6 +723,24 @@ TEST_F(MuxerTest, UseFixedSizeClusterTimecode) {
|
||||
filename_));
|
||||
}
|
||||
|
||||
TEST_F(MuxerTest, DocTypeWebm) {
|
||||
EXPECT_TRUE(SegmentInit(false, false, false));
|
||||
AddVideoTrack();
|
||||
Track* const vid_track = segment_.GetTrackByNumber(kVideoTrackNumber);
|
||||
vid_track->set_codec_id(kVP9CodecId);
|
||||
AddDummyFrameAndFinalize(kVideoTrackNumber);
|
||||
EXPECT_TRUE(CompareFiles(GetTestFilePath("webm_doctype.webm"), filename_));
|
||||
}
|
||||
|
||||
TEST_F(MuxerTest, DocTypeMatroska) {
|
||||
EXPECT_TRUE(SegmentInit(false, false, false));
|
||||
AddVideoTrack();
|
||||
Track* const vid_track = segment_.GetTrackByNumber(kVideoTrackNumber);
|
||||
vid_track->set_codec_id("V_SOMETHING_NOT_IN_WEBM");
|
||||
AddDummyFrameAndFinalize(kVideoTrackNumber);
|
||||
EXPECT_TRUE(CompareFiles(GetTestFilePath("matroska_doctype.mkv"), filename_));
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
BIN
testing/testdata/matroska_doctype.mkv
vendored
Normal file
BIN
testing/testdata/matroska_doctype.mkv
vendored
Normal file
Binary file not shown.
BIN
testing/testdata/webm_doctype.webm
vendored
Normal file
BIN
testing/testdata/webm_doctype.webm
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user