[MPlayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.116,1.117

Roberto Togni CVS syncmail at mplayerhq.hu
Thu Mar 31 00:10:09 CEST 2005


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv17237

Modified Files:
	demux_mov.c 
Log Message:
Fix alac from QTpro (in standard mov file, not in m4a file)
Extradata is in a different place
fixes samples/A-codecs/lossless/ALAC/alac.mov


Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- demux_mov.c	6 Mar 2005 17:55:31 -0000	1.116
+++ demux_mov.c	30 Mar 2005 22:10:07 -0000	1.117
@@ -950,8 +950,19 @@
 		    int fcc=char2int(trak->stdata,48);
 		    // we have extra audio headers!!!
 		    printf("Audio extra header: len=%d  fcc=0x%X\n",len,fcc);
+		    if((len >= 4) && 
+		       (char2int(trak->stdata,52) >= 12) &&
+		       (char2int(trak->stdata,52+4) == MOV_FOURCC('f','r','m','a')) &&
+		       (char2int(trak->stdata,52+8) == MOV_FOURCC('a','l','a','c')) &&
+		       (len >= 36 + char2int(trak->stdata,52))) {
+			    sh->codecdata_len = char2int(trak->stdata,52+char2int(trak->stdata,52));
+			    mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found alac atom (%d)!\n", sh->codecdata_len);
+			    sh->codecdata = (unsigned char *)malloc(sh->codecdata_len);
+			    memcpy(sh->codecdata, &trak->stdata[52+char2int(trak->stdata,52)], sh->codecdata_len);
+		    } else {
 		    sh->codecdata_len = len-8;
 		    sh->codecdata = trak->stdata+44+8;
+		    }
 		  }
 		}
 




More information about the MPlayer-cvslog mailing list