From 5b122fd41a67e899486e744fb2c402ea4f4c37a6 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Fri, 14 Dec 2007 07:14:33 +0000 Subject: Set correct image format for 24bit "raw " in mov files. Patch by Chas Williams, chas A cmf D nrl D navy D mil git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25387 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_mov.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libmpdemux') diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c index fc43199dda..a07fe13da9 100644 --- a/libmpdemux/demux_mov.c +++ b/libmpdemux/demux_mov.c @@ -40,6 +40,8 @@ #include "demuxer.h" #include "stheader.h" +#include "libmpcodecs/img_format.h" + #include "libvo/sub.h" #include "qtpalette.h" @@ -929,6 +931,11 @@ static int gen_sh_video(sh_video_t* sh, mov_track_t* trak, int timescale) { int flag, start, count_flag, end, palette_count, gray; int hdr_ptr = 76; // the byte just after depth unsigned char *palette_map; + + depth = trak->stdata[75] | (trak->stdata[74] << 8); + if (trak->fourcc == mmioFOURCC('r', 'a', 'w', ' ')) { + sh->format = IMGFMT_RGB | depth; + } else sh->format=trak->fourcc; // crude video delay from editlist0 hack ::atm @@ -946,7 +953,6 @@ static int gen_sh_video(sh_video_t* sh, mov_track_t* trak, int timescale) { trak->stdata_len); return 0; } - depth = trak->stdata[75] | (trak->stdata[74] << 8); // stdata[]: // 8 short version // 10 short revision -- cgit v1.2.3