1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-16 20:05:07 +00:00

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
This commit is contained in:
cehoyos 2007-12-14 07:14:33 +00:00
parent e34efdf167
commit 5b122fd41a

View File

@ -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