Previous 199869 Revisions Next

r23816 Thursday 20th June, 2013 at 10:46:43 UTC by Oliver Stöneberg
small formating change to src/lib/util/aviio.c (nw)
[src/lib/util]aviio.c

trunk/src/lib/util/aviio.c
r23815r23816
12691269   if (avierr != AVIERR_NONE)
12701270      goto error;
12711271
1272      /* find the avih chunk */
1273      avierr = find_first_chunk(file, CHUNKTYPE_AVIH, &hdrl, &avih);
1272   /* find the avih chunk */
1273   avierr = find_first_chunk(file, CHUNKTYPE_AVIH, &hdrl, &avih);
1274   if (avierr != AVIERR_NONE)
1275      goto error;
1276
1277   /* parse the avih chunk */
1278   avierr = parse_avih_chunk(file, &avih);
1279   if (avierr != AVIERR_NONE)
1280      goto error;
1281
1282   /* loop over strl LIST chunks */
1283   strindex = 0;
1284   for (avierr = find_first_list(file, LISTTYPE_STRL, &hdrl, &strl); avierr == AVIERR_NONE; avierr = find_next_list(file, LISTTYPE_STRL, &hdrl, &strl))
1285   {
1286      /* if we have too many, it's a bad file */
1287      if (strindex >= file->streams)
1288         goto error;
1289
1290      /* find the strh chunk */
1291      avierr = find_first_chunk(file, CHUNKTYPE_STRH, &strl, &strh);
12741292      if (avierr != AVIERR_NONE)
12751293         goto error;
12761294
1277      /* parse the avih chunk */
1278      avierr = parse_avih_chunk(file, &avih);
1295      /* parse the data */
1296      avierr = parse_strh_chunk(file, &file->stream[strindex], &strh);
12791297      if (avierr != AVIERR_NONE)
12801298         goto error;
12811299
1282      /* loop over strl LIST chunks */
1283      strindex = 0;
1284      for (avierr = find_first_list(file, LISTTYPE_STRL, &hdrl, &strl); avierr == AVIERR_NONE; avierr = find_next_list(file, LISTTYPE_STRL, &hdrl, &strl))
1285      {
1286         /* if we have too many, it's a bad file */
1287         if (strindex >= file->streams)
1288            goto error;
1300      /* find the strf chunk */
1301      avierr = find_first_chunk(file, CHUNKTYPE_STRF, &strl, &strf);
1302      if (avierr != AVIERR_NONE)
1303         goto error;
12891304
1290         /* find the strh chunk */
1291         avierr = find_first_chunk(file, CHUNKTYPE_STRH, &strl, &strh);
1292         if (avierr != AVIERR_NONE)
1293            goto error;
1305      /* parse the data */
1306      avierr = parse_strf_chunk(file, &file->stream[strindex], &strf);
1307      if (avierr != AVIERR_NONE)
1308         goto error;
12941309
1295         /* parse the data */
1296         avierr = parse_strh_chunk(file, &file->stream[strindex], &strh);
1297         if (avierr != AVIERR_NONE)
1298            goto error;
1310      /* find the indx chunk, if present */
1311      avierr = find_first_chunk(file, CHUNKTYPE_INDX, &strl, &indx);
1312      if (avierr == AVIERR_NONE)
1313         avierr = parse_indx_chunk(file, &file->stream[strindex], &indx);
12991314
1300         /* find the strf chunk */
1301         avierr = find_first_chunk(file, CHUNKTYPE_STRF, &strl, &strf);
1302         if (avierr != AVIERR_NONE)
1303            goto error;
1315      /* next stream */
1316      strindex++;
1317   }
13041318
1305         /* parse the data */
1306         avierr = parse_strf_chunk(file, &file->stream[strindex], &strf);
1307         if (avierr != AVIERR_NONE)
1308            goto error;
1319   /* normalize the error after parsing the stream headers */
1320   if (avierr == AVIERR_END)
1321      avierr = AVIERR_NONE;
1322   if (avierr != AVIERR_NONE)
1323      goto error;
13091324
1310         /* find the indx chunk, if present */
1311         avierr = find_first_chunk(file, CHUNKTYPE_INDX, &strl, &indx);
1312         if (avierr == AVIERR_NONE)
1313            avierr = parse_indx_chunk(file, &file->stream[strindex], &indx);
1314
1315         /* next stream */
1316         strindex++;
1317      }
1318
1319      /* normalize the error after parsing the stream headers */
1320      if (avierr == AVIERR_END)
1321         avierr = AVIERR_NONE;
1322      if (avierr != AVIERR_NONE)
1323         goto error;
1324
13251325   /* find the base of the movi data */
13261326   avierr = find_first_list(file, LISTTYPE_MOVI, &riff, &movi);
13271327   if (avierr != AVIERR_NONE)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team