mirror of
https://github.com/holub/mame
synced 2025-04-25 01:40:16 +03:00
Fixed bug when writing AVI files with more than one RIFF chunk.
Added missing chdman error messages when extracting to an AVI file.
This commit is contained in:
parent
e6a2212387
commit
fd883f1e72
@ -1719,8 +1719,10 @@ static avi_error chunk_write(avi_file *file, UINT32 type, const void *data, UINT
|
||||
UINT32 written;
|
||||
|
||||
/* if we are getting too big, split the RIFF */
|
||||
/* note that we ignore writes before the current RIFF base, as those are assumed to be
|
||||
overwrites of a chunk from the previous RIFF */
|
||||
if ((file->riffbase == 0 && file->writeoffs + length + compute_idx1_size(file) >= MAX_RIFF_SIZE) ||
|
||||
file->writeoffs + length - file->riffbase >= MAX_RIFF_SIZE)
|
||||
(file->writeoffs >= file->riffbase && file->writeoffs + length - file->riffbase >= MAX_RIFF_SIZE))
|
||||
{
|
||||
/* close the movi list */
|
||||
avierr = chunk_close(file);
|
||||
|
@ -1553,7 +1553,10 @@ static int do_extractav(int argc, char *argv[], int param)
|
||||
{
|
||||
avierr = avi_append_sound_samples(avi, chnum, avconfig.audio[chnum], numsamples, 0);
|
||||
if (avierr != AVIERR_NONE)
|
||||
{
|
||||
fprintf(stderr, "Error writing samples for hunk %d to AVI file: %s\n", firstframe + framenum, avi_error_string(avierr));
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
/* write video */
|
||||
@ -1561,7 +1564,10 @@ static int do_extractav(int argc, char *argv[], int param)
|
||||
{
|
||||
avierr = avi_append_video_frame_yuy16(avi, fullbitmap);
|
||||
if (avierr != AVIERR_NONE)
|
||||
{
|
||||
fprintf(stderr, "Error writing video for hunk %d to AVI file: %s\n", firstframe + framenum, avi_error_string(avierr));
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
progress(TRUE, "Extraction complete! \n");
|
||||
|
Loading…
Reference in New Issue
Block a user