diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2011-06-14 01:53:40 +0200 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2011-06-14 01:53:40 +0200 |
commit | f440f742052256a854ce2f81a52fa5cf305a895c (patch) | |
tree | 68e4b474610e430cc258544c71cd741f95e3c047 /libavformat/matroskaenc.c | |
parent | e6ba3d428105edbd3c1a468ece619f801151eea2 (diff) | |
download | ffmpeg-streaming-f440f742052256a854ce2f81a52fa5cf305a895c.zip ffmpeg-streaming-f440f742052256a854ce2f81a52fa5cf305a895c.tar.gz |
matroskaenc: ensure the written colorspace don't depend on host endianness
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 50e931e..9e42019 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -615,8 +615,10 @@ static int mkv_write_tracks(AVFormatContext *s) 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); + if (codec->codec_id == CODEC_ID_RAWVIDEO) { + uint32_t color_space = av_le2ne32(codec->codec_tag); + put_ebml_binary(pb, MATROSKA_ID_VIDEOCOLORSPACE, &color_space, sizeof(color_space)); + } end_ebml_master(pb, subinfo); break; |