1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

The "initialize wav header with infinite lenght" broke the

post-recording fixup by changing the initialisation value of
data_length.  This fixes it.
based on patch by Olivier Galibert <galibert@pobox.com>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9278 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2003-02-04 18:22:43 +00:00
parent 409f2f0ada
commit 7a35f528d1

View File

@ -107,6 +107,9 @@ static int init(int rate,int channels,int format,int flags){
wavhdr.sample_rate = le2me_32(ao_data.samplerate);
wavhdr.bytes_per_second = le2me_32(ao_data.bps);
wavhdr.bits = le2me_16(bits);
wavhdr.data_length=le2me_32(0x7ffff000);
wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8;
printf("PCM: File: %s (%s)\n"
"PCM: Samplerate: %iHz Channels: %s Format %s\n",
@ -118,8 +121,10 @@ static int init(int rate,int channels,int format,int flags){
fp = fopen(ao_outputfilename, "wb");
if(fp) {
if(ao_pcm_waveheader) /* Reserve space for wave header */
if(ao_pcm_waveheader){ /* Reserve space for wave header */
fwrite(&wavhdr,sizeof(wavhdr),1,fp);
wavhdr.file_length=wavhdr.data_length=0;
}
return 1;
}
printf("PCM: Failed to open %s for writing!\n", ao_outputfilename);