BelledonneCommunications / mediastreamer2

Linphone.org mirror for mediastreamer2 (git://git.linphone.org/mediastreamer2.git)
http://linphone.org
GNU Affero General Public License v3.0
133 stars 104 forks source link

Fix WAV audio recordings #32

Open schlagert opened 3 years ago

schlagert commented 3 years ago

Using WAV as the audio recording format resulted in corrupted files where the chunk length did not properly correspond to the actual chunk content or file length.

This was caused by initially writing the audio samples to the start of the file instead of the data chunk. On close, writing the WAV header would then overwrite the first bytes of audio.