matroskaenc: write colourspace element for rawvideo tracks
authorAurelien Jacobs <aurel@gnuage.org>
Mon, 13 Jun 2011 16:37:32 +0000 (18:37 +0200)
committerAurelien Jacobs <aurel@gnuage.org>
Mon, 13 Jun 2011 16:37:32 +0000 (18:37 +0200)
libavformat/matroskaenc.c

index 9901dc0..50e931e 100644 (file)
@@ -614,6 +614,9 @@ static int mkv_write_tracks(AVFormatContext *s)
                     put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, codec->height);
                     put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYUNIT, 3);
                 }
+
+                if (codec->codec_id == CODEC_ID_RAWVIDEO)
+                    put_ebml_binary(pb, MATROSKA_ID_VIDEOCOLORSPACE, &codec->codec_tag, 4);
                 end_ebml_master(pb, subinfo);
                 break;