The one-line fix below fixes a problem where aviio.c writes out ridiculously

large lengths for the audio stream of an AVI file. The occurrence of the
bug depends on the way that audio buffers are filled by the calling code;
if there are never two or more chunk's worth of audio samples queued then
the bug will not occur. [CDiFan]
This commit is contained in:
Aaron Giles 2009-11-25 06:41:07 +00:00
parent bdc6c1cc6a
commit f1f5ea0287

View File

@ -2307,7 +2307,7 @@ static avi_error soundbuf_flush(avi_file *file, int only_flush_full)
/* add up the samples */
if (channelsamples > 0)
file->info.audio_numsamples = stream->samples += channelsamples;
file->info.audio_numsamples = stream->samples += chunksamples;
/* advance past those */
processedsamples += chunksamples;