mirror of
https://github.com/holub/mame
synced 2025-05-24 23:05:32 +03:00
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:
parent
bdc6c1cc6a
commit
f1f5ea0287
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user