summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-14 07:14:33 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-14 07:14:33 +0000
commit5b122fd41a67e899486e744fb2c402ea4f4c37a6 (patch)
tree3eaa71c29ce1f7b5516c9d18fe13acbc97072f39 /libmpdemux
parente34efdf16796e30ae5b7a063d88d2709b4b81368 (diff)
downloadmpv-5b122fd41a67e899486e744fb2c402ea4f4c37a6.tar.bz2
mpv-5b122fd41a67e899486e744fb2c402ea4f4c37a6.tar.xz
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
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_mov.c8
1 files changed, 7 insertions, 1 deletions
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