]> git.sesse.net Git - x264/commitdiff
matroska: Write the correct DocTypeVersion when using frame-packing
authorHenrik Gramner <henrik@gramner.com>
Sat, 25 Jul 2015 20:42:59 +0000 (22:42 +0200)
committerHenrik Gramner <henrik@gramner.com>
Sat, 25 Jul 2015 20:52:54 +0000 (22:52 +0200)
The StereoMode element is only valid with DocTypeVersion 3 or higher.

output/matroska_ebml.c

index db2c35f701a33f97a8e9530890f5978860d003bc..864c1af3bd14b3c32d348837efa3f4c7ac1e1768 100644 (file)
@@ -340,7 +340,7 @@ int mk_write_header( mk_writer *w, const char *writing_app,
     CHECK( mk_write_uint( c, 0x42f2, 4 ) ); // EBMLMaxIDLength
     CHECK( mk_write_uint( c, 0x42f3, 8 ) ); // EBMLMaxSizeLength
     CHECK( mk_write_string( c, 0x4282, "matroska") ); // DocType
-    CHECK( mk_write_uint( c, 0x4287, 2 ) ); // DocTypeVersion
+    CHECK( mk_write_uint( c, 0x4287, stereo_mode >= 0 ? 3 : 2 ) ); // DocTypeVersion
     CHECK( mk_write_uint( c, 0x4285, 2 ) ); // DocTypeReadversion
     CHECK( mk_close_context( c, 0 ) );