[Mplayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.46,1.47
Arpi of Ize
arpi at mplayer.dev.hu
Thu Mar 21 21:18:36 CET 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv609
Modified Files:
demux_mov.c
Log Message:
support multiple video header extension chunks
Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- demux_mov.c 21 Mar 2002 16:44:15 -0000 1.46
+++ demux_mov.c 21 Mar 2002 20:18:30 -0000 1.47
@@ -739,12 +739,10 @@
if(trak->stdata_len >= 86) { // extra atoms found
- int atom_len = char2int(trak->stdata,78);
- if((trak->stdata_len - atom_len) > 78)
- mp_msg(MSGT_DEMUX, MSGL_WARN, "MOV: Movie stdata contains more then one atom (yet unsupported)!\n");
- // TODO: add support for multiple atoms, by analyzing stdata len
- // and comparing with len of first atom ::atmos
- switch(char2int(trak->stdata,82)) { // switch atom type
+ int pos=78;
+ while(pos+8<=trak->stdata_len &&
+ (pos+(atom_len=char2int(trak->stdata,pos)))<=trak->stdata_len){
+ switch(char2int(trak->stdata,pos+4)) { // switch atom type
case MOV_FOURCC('g','a','m','a'):
// intfp with gamma value at which movie was captured
// can be used to gamma correct movie display
@@ -776,8 +774,10 @@
break;
default:
mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found unknown movie atom %c%c%c%c (%d)!\n",
- trak->stdata[86],trak->stdata[87],trak->stdata[88],trak->stdata[89],
+ trak->stdata[pos+4],trak->stdata[pos+5],trak->stdata[pos+6],trak->stdata[pos+7],
atom_len);
+ }
+ pos+=atom_len;
}
}
if(!sh->fps) sh->fps=trak->timescale;
More information about the MPlayer-cvslog
mailing list