[MPlayer-dev-eng] quicktime 'raw ' format files not handled properly

chas williams - CONTRACTOR chas at cmf.nrl.navy.mil
Fri Dec 7 04:43:48 CET 2007


quicktime 'raw ' format video codec should be give the format tag
IMGFMT_RGB. 

'raw ' encoded files are not that common, but we have some hdtv 720p
quicktime files in this format that we needed to play.  that's about
230MB/s.  pretty impressive that mplayer keeps up with that.

--- libmpdemux/demux_mov.c.orig	2007-10-07 15:49:33.000000000 -0400
+++ libmpdemux/demux_mov.c	2007-11-02 15:29:02.000000000 -0400
@@ -40,6 +40,8 @@
 #include "demuxer.h"
 #include "stheader.h"
 
+#include "libmpcodecs/img_format.h"
+
 #include "libvo/sub.h"
 
 #include "qtpalette.h"
@@ -929,7 +931,12 @@
 		int flag, start, count_flag, end, palette_count, gray;
 		int hdr_ptr = 76;  // the byte just after depth
 		unsigned char *palette_map;
-		sh->format=trak->fourcc;
+
+		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
 		if(trak->editlist_size>=1) {
@@ -946,7 +953,6 @@
 		  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-dev-eng mailing list