Mercurial > mplayer.hg
comparison aviheader.c @ 1038:b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
author | arpi_esp |
---|---|
date | Tue, 05 Jun 2001 18:40:44 +0000 |
parents | 50c5a214b0d4 |
children | 3f490fad9bdf |
comparison
equal
deleted
inserted
replaced
1037:2767682b85de | 1038:b36fb1ae4b53 |
---|---|
109 case mmioFOURCC('A', 'P', '4', '1'): | 109 case mmioFOURCC('A', 'P', '4', '1'): |
110 idxfix_divx=1; // we can fix keyframes only for divx coded files! | 110 idxfix_divx=1; // we can fix keyframes only for divx coded files! |
111 } | 111 } |
112 } else | 112 } else |
113 if(last_fccType==streamtypeAUDIO){ | 113 if(last_fccType==streamtypeAUDIO){ |
114 sh_audio->wf=calloc((chunksize<sizeof(WAVEFORMATEX))?sizeof(WAVEFORMATEX):chunksize,1); | 114 int wf_size = chunksize<sizeof(WAVEFORMATEX)?sizeof(WAVEFORMATEX):chunksize; |
115 sh_audio->wf=calloc(wf_size,1); | |
115 // sh_audio->wf=malloc(chunksize); memset(sh_audio->wf,0,chunksize); | 116 // sh_audio->wf=malloc(chunksize); memset(sh_audio->wf,0,chunksize); |
116 if(verbose>=1) printf("found 'wf', %d bytes of %d\n",chunksize,sizeof(WAVEFORMATEX)); | 117 if(verbose>=1) printf("found 'wf', %d bytes of %d\n",chunksize,sizeof(WAVEFORMATEX)); |
117 stream_read(demuxer->stream,(char*) sh_audio->wf,chunksize); | 118 stream_read(demuxer->stream,(char*) sh_audio->wf,chunksize); |
119 if (sh_audio->wf->cbSize != 0 && | |
120 wf_size < sizeof(WAVEFORMATEX)+sh_audio->wf->cbSize) { | |
121 sh_audio->wf=realloc(sh_audio->wf, sizeof(WAVEFORMATEX)+sh_audio->wf->cbSize); | |
122 } | |
118 chunksize=0; | 123 chunksize=0; |
119 if(verbose>=1) print_wave_header(sh_audio->wf); | 124 if(verbose>=1) print_wave_header(sh_audio->wf); |
120 // if(demuxer->audio->id==-1) demuxer->audio->id=stream_id; | 125 // if(demuxer->audio->id==-1) demuxer->audio->id=stream_id; |
121 } | 126 } |
122 break; | 127 break; |