[MPlayer-cvslog] r25387 - trunk/libmpdemux/demux_mov.c

cehoyos subversion at mplayerhq.hu
Fri Dec 14 08:14:34 CET 2007


Author: cehoyos
Date: Fri Dec 14 08:14:33 2007
New Revision: 25387

Log:
Set correct image format for 24bit "raw " in mov files.

Patch by Chas Williams, chas A cmf D nrl D navy D mil


Modified:
   trunk/libmpdemux/demux_mov.c

Modified: trunk/libmpdemux/demux_mov.c
==============================================================================
--- trunk/libmpdemux/demux_mov.c	(original)
+++ trunk/libmpdemux/demux_mov.c	Fri Dec 14 08:14:33 2007
@@ -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, 
 		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, 
 		  trak->stdata_len);
 		  return 0;
 		}
-		depth = trak->stdata[75] | (trak->stdata[74] << 8);
 //  stdata[]:
 //	8   short	version
 //	10  short	revision



More information about the MPlayer-cvslog mailing list