diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2011-06-14 02:00:06 +0200 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2011-06-14 02:00:06 +0200 |
commit | fdb5e02901111a6a53f8386d82afae0aa2d746a7 (patch) | |
tree | efb0c6b7b2e7a52a8168ad6ac092892619ce0dea /libavformat | |
parent | 5fec3a2539b7c94a94fe891c3f7d92e6d5291682 (diff) | |
download | ffmpeg-fdb5e02901111a6a53f8386d82afae0aa2d746a7.tar.gz |
matroskadec: properly decode color space in an endian neutral way
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskadec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 32b2c8efca..6e951bac18 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -112,7 +112,7 @@ typedef struct { uint64_t display_height; uint64_t pixel_width; uint64_t pixel_height; - uint64_t fourcc; + EbmlBin color_space; uint64_t stereo_mode; } MatroskaTrackVideo; @@ -302,7 +302,7 @@ static EbmlSyntax matroska_track_video[] = { { MATROSKA_ID_VIDEODISPLAYHEIGHT, EBML_UINT, 0, offsetof(MatroskaTrackVideo,display_height) }, { MATROSKA_ID_VIDEOPIXELWIDTH, EBML_UINT, 0, offsetof(MatroskaTrackVideo,pixel_width) }, { MATROSKA_ID_VIDEOPIXELHEIGHT, EBML_UINT, 0, offsetof(MatroskaTrackVideo,pixel_height) }, - { MATROSKA_ID_VIDEOCOLORSPACE, EBML_UINT, 0, offsetof(MatroskaTrackVideo,fourcc) }, + { MATROSKA_ID_VIDEOCOLORSPACE, EBML_BIN, 0, offsetof(MatroskaTrackVideo,color_space) }, { MATROSKA_ID_VIDEOSTEREOMODE, EBML_UINT, 0, offsetof(MatroskaTrackVideo,stereo_mode) }, { MATROSKA_ID_VIDEOPIXELCROPB, EBML_NONE }, { MATROSKA_ID_VIDEOPIXELCROPT, EBML_NONE }, @@ -1303,7 +1303,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) track->video.display_width = track->video.pixel_width; if (!track->video.display_height) track->video.display_height = track->video.pixel_height; - fourcc = track->video.fourcc; + if (track->video.color_space.size == 4) + fourcc = AV_RL32(track->video.color_space.data); } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) { if (!track->audio.out_samplerate) track->audio.out_samplerate = track->audio.samplerate; |