[x264-devel] matroska: Write the correct DocTypeVersion when using frame-packing

Henrik Gramner git at videolan.org
Sun Jul 26 22:26:31 CEST 2015


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Sat Jul 25 22:42:59 2015 +0200| [0c21480fa2fdee345a3049e2169624dc6fc2acfc] | committer: Henrik Gramner

matroska: Write the correct DocTypeVersion when using frame-packing

The StereoMode element is only valid with DocTypeVersion 3 or higher.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=0c21480fa2fdee345a3049e2169624dc6fc2acfc
---

 output/matroska_ebml.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/output/matroska_ebml.c b/output/matroska_ebml.c
index db2c35f..864c1af 100644
--- a/output/matroska_ebml.c
+++ b/output/matroska_ebml.c
@@ -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 ) );
 



More information about the x264-devel mailing list