changeset 25359:4bb08145bf66

Set correct image format for 24bit "raw " in mov files. Patch by Chas Williams, chas A cmf D nrl D navy D mil
author cehoyos
date Fri, 14 Dec 2007 07:14:33 +0000
parents 89b3a18bfa66
children 574ff7687644
files libmpdemux/demux_mov.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Thu Dec 13 12:51:05 2007 +0000
+++ b/libmpdemux/demux_mov.c	Fri Dec 14 07:14:33 2007 +0000
@@ -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 @@
 		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 @@
 		  trak->stdata_len);
 		  return 0;
 		}
-		depth = trak->stdata[75] | (trak->stdata[74] << 8);
 //  stdata[]:
 //	8   short	version
 //	10  short	revision