mirror of
https://github.com/holub/mame
synced 2025-05-28 08:33:05 +03:00
02442: -aviwrite produces faulty files
This commit is contained in:
parent
2a3301d0b9
commit
6c05b835a2
@ -2539,8 +2539,8 @@ void video_avi_begin_recording(running_machine *machine, const char *name)
|
||||
info.video_depth = 24;
|
||||
|
||||
info.audio_format = 0;
|
||||
info.audio_timescale = 1;
|
||||
info.audio_sampletime = machine->sample_rate;
|
||||
info.audio_timescale = machine->sample_rate;
|
||||
info.audio_sampletime = 1;
|
||||
info.audio_numsamples = 0;
|
||||
info.audio_channels = 2;
|
||||
info.audio_samplebits = 16;
|
||||
|
@ -643,14 +643,6 @@ avi_error avi_close(avi_file *file)
|
||||
if (avierr == AVIERR_NONE && file->riffbase == 0)
|
||||
avierr = write_idx1_chunk(file);
|
||||
|
||||
/* close the RIFF chunk */
|
||||
if (avierr == AVIERR_NONE)
|
||||
avierr = chunk_close(file);
|
||||
|
||||
/* update the avih chunk */
|
||||
if (avierr == AVIERR_NONE)
|
||||
avierr = write_avih_chunk(file, FALSE);
|
||||
|
||||
/* update the strh and indx chunks for each stream */
|
||||
for (strnum = 0; strnum < file->streams; strnum++)
|
||||
{
|
||||
@ -659,6 +651,14 @@ avi_error avi_close(avi_file *file)
|
||||
if (avierr == AVIERR_NONE)
|
||||
avierr = write_indx_chunk(file, &file->stream[strnum], FALSE);
|
||||
}
|
||||
|
||||
/* update the avih chunk */
|
||||
if (avierr == AVIERR_NONE)
|
||||
avierr = write_avih_chunk(file, FALSE);
|
||||
|
||||
/* close the RIFF chunk */
|
||||
if (avierr == AVIERR_NONE)
|
||||
avierr = chunk_close(file);
|
||||
}
|
||||
|
||||
/* close the file */
|
||||
|
Loading…
Reference in New Issue
Block a user