comparison libmpdemux/demux_mov.c @ 5250:e26352c3fa9b

support multiple video header extension chunks
author arpi
date Thu, 21 Mar 2002 20:18:30 +0000
parents 34c706ab6f6f
children 5601c6017be3
comparison
equal deleted inserted replaced
5249:eafaa705a354 5250:e26352c3fa9b
737 // 82 char[4] atom type 737 // 82 char[4] atom type
738 // 86 ... atom data 738 // 86 ... atom data
739 739
740 740
741 if(trak->stdata_len >= 86) { // extra atoms found 741 if(trak->stdata_len >= 86) { // extra atoms found
742 int atom_len = char2int(trak->stdata,78); 742 int pos=78;
743 if((trak->stdata_len - atom_len) > 78) 743 while(pos+8<=trak->stdata_len &&
744 mp_msg(MSGT_DEMUX, MSGL_WARN, "MOV: Movie stdata contains more then one atom (yet unsupported)!\n"); 744 (pos+(atom_len=char2int(trak->stdata,pos)))<=trak->stdata_len){
745 // TODO: add support for multiple atoms, by analyzing stdata len 745 switch(char2int(trak->stdata,pos+4)) { // switch atom type
746 // and comparing with len of first atom ::atmos
747 switch(char2int(trak->stdata,82)) { // switch atom type
748 case MOV_FOURCC('g','a','m','a'): 746 case MOV_FOURCC('g','a','m','a'):
749 // intfp with gamma value at which movie was captured 747 // intfp with gamma value at which movie was captured
750 // can be used to gamma correct movie display 748 // can be used to gamma correct movie display
751 mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found unsupported Gamma-Correction movie atom (%d)!\n", 749 mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found unsupported Gamma-Correction movie atom (%d)!\n",
752 atom_len); 750 atom_len);
774 // beginning at stdata[86] to some variable to pass it 772 // beginning at stdata[86] to some variable to pass it
775 // on to the decoder ::atmos 773 // on to the decoder ::atmos
776 break; 774 break;
777 default: 775 default:
778 mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found unknown movie atom %c%c%c%c (%d)!\n", 776 mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found unknown movie atom %c%c%c%c (%d)!\n",
779 trak->stdata[86],trak->stdata[87],trak->stdata[88],trak->stdata[89], 777 trak->stdata[pos+4],trak->stdata[pos+5],trak->stdata[pos+6],trak->stdata[pos+7],
780 atom_len); 778 atom_len);
779 }
780 pos+=atom_len;
781 } 781 }
782 } 782 }
783 if(!sh->fps) sh->fps=trak->timescale; 783 if(!sh->fps) sh->fps=trak->timescale;
784 sh->frametime=1.0f/sh->fps; 784 sh->frametime=1.0f/sh->fps;
785 785