From 1f4fe0303a08ee76f544b7471388c2268800cf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Thu, 20 Jun 2013 10:46:43 +0000 Subject: [PATCH] small formating change to src/lib/util/aviio.c (nw) --- src/lib/util/aviio.c | 88 ++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c index 4cabe446f1f..8c704f9d220 100644 --- a/src/lib/util/aviio.c +++ b/src/lib/util/aviio.c @@ -1269,59 +1269,59 @@ static avi_error read_movie_data(avi_file *file) if (avierr != AVIERR_NONE) goto error; - /* find the avih chunk */ - avierr = find_first_chunk(file, CHUNKTYPE_AVIH, &hdrl, &avih); + /* find the avih chunk */ + 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) goto error; - /* parse the avih chunk */ - avierr = parse_avih_chunk(file, &avih); + /* parse the data */ + avierr = parse_strh_chunk(file, &file->stream[strindex], &strh); 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) - 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; + /* 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) + goto error; + /* find the base of the movi data */ avierr = find_first_list(file, LISTTYPE_MOVI, &riff, &movi); if (avierr != AVIERR_NONE)