mirror of
https://github.com/holub/mame
synced 2025-05-01 20:27:02 +03:00
small formating change to src/lib/util/aviio.c (nw)
This commit is contained in:
parent
0c2201318c
commit
1f4fe0303a
@ -1269,59 +1269,59 @@ static avi_error read_movie_data(avi_file *file)
|
|||||||
if (avierr != AVIERR_NONE)
|
if (avierr != AVIERR_NONE)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* find the avih chunk */
|
/* find the avih chunk */
|
||||||
avierr = find_first_chunk(file, CHUNKTYPE_AVIH, &hdrl, &avih);
|
avierr = find_first_chunk(file, CHUNKTYPE_AVIH, &hdrl, &avih);
|
||||||
|
if (avierr != AVIERR_NONE)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
/* parse the avih chunk */
|
||||||
|
avierr = parse_avih_chunk(file, &avih);
|
||||||
|
if (avierr != AVIERR_NONE)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
/* loop over strl LIST chunks */
|
||||||
|
strindex = 0;
|
||||||
|
for (avierr = find_first_list(file, LISTTYPE_STRL, &hdrl, &strl); avierr == AVIERR_NONE; avierr = find_next_list(file, LISTTYPE_STRL, &hdrl, &strl))
|
||||||
|
{
|
||||||
|
/* if we have too many, it's a bad file */
|
||||||
|
if (strindex >= file->streams)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
/* find the strh chunk */
|
||||||
|
avierr = find_first_chunk(file, CHUNKTYPE_STRH, &strl, &strh);
|
||||||
if (avierr != AVIERR_NONE)
|
if (avierr != AVIERR_NONE)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* parse the avih chunk */
|
/* parse the data */
|
||||||
avierr = parse_avih_chunk(file, &avih);
|
avierr = parse_strh_chunk(file, &file->stream[strindex], &strh);
|
||||||
if (avierr != AVIERR_NONE)
|
if (avierr != AVIERR_NONE)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* loop over strl LIST chunks */
|
/* find the strf chunk */
|
||||||
strindex = 0;
|
avierr = find_first_chunk(file, CHUNKTYPE_STRF, &strl, &strf);
|
||||||
for (avierr = find_first_list(file, LISTTYPE_STRL, &hdrl, &strl); avierr == AVIERR_NONE; avierr = find_next_list(file, LISTTYPE_STRL, &hdrl, &strl))
|
|
||||||
{
|
|
||||||
/* if we have too many, it's a bad file */
|
|
||||||
if (strindex >= file->streams)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* find the strh chunk */
|
|
||||||
avierr = find_first_chunk(file, CHUNKTYPE_STRH, &strl, &strh);
|
|
||||||
if (avierr != AVIERR_NONE)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* parse the data */
|
|
||||||
avierr = parse_strh_chunk(file, &file->stream[strindex], &strh);
|
|
||||||
if (avierr != AVIERR_NONE)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* find the strf chunk */
|
|
||||||
avierr = find_first_chunk(file, CHUNKTYPE_STRF, &strl, &strf);
|
|
||||||
if (avierr != AVIERR_NONE)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* parse the data */
|
|
||||||
avierr = parse_strf_chunk(file, &file->stream[strindex], &strf);
|
|
||||||
if (avierr != AVIERR_NONE)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* find the indx chunk, if present */
|
|
||||||
avierr = find_first_chunk(file, CHUNKTYPE_INDX, &strl, &indx);
|
|
||||||
if (avierr == AVIERR_NONE)
|
|
||||||
avierr = parse_indx_chunk(file, &file->stream[strindex], &indx);
|
|
||||||
|
|
||||||
/* next stream */
|
|
||||||
strindex++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* normalize the error after parsing the stream headers */
|
|
||||||
if (avierr == AVIERR_END)
|
|
||||||
avierr = AVIERR_NONE;
|
|
||||||
if (avierr != AVIERR_NONE)
|
if (avierr != AVIERR_NONE)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
/* parse the data */
|
||||||
|
avierr = parse_strf_chunk(file, &file->stream[strindex], &strf);
|
||||||
|
if (avierr != AVIERR_NONE)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
/* find the indx chunk, if present */
|
||||||
|
avierr = find_first_chunk(file, CHUNKTYPE_INDX, &strl, &indx);
|
||||||
|
if (avierr == AVIERR_NONE)
|
||||||
|
avierr = parse_indx_chunk(file, &file->stream[strindex], &indx);
|
||||||
|
|
||||||
|
/* next stream */
|
||||||
|
strindex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* normalize the error after parsing the stream headers */
|
||||||
|
if (avierr == AVIERR_END)
|
||||||
|
avierr = AVIERR_NONE;
|
||||||
|
if (avierr != AVIERR_NONE)
|
||||||
|
goto error;
|
||||||
|
|
||||||
/* find the base of the movi data */
|
/* find the base of the movi data */
|
||||||
avierr = find_first_list(file, LISTTYPE_MOVI, &riff, &movi);
|
avierr = find_first_list(file, LISTTYPE_MOVI, &riff, &movi);
|
||||||
if (avierr != AVIERR_NONE)
|
if (avierr != AVIERR_NONE)
|
||||||
|
Loading…
Reference in New Issue
Block a user