X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=ogg_afh_common.c;h=474bbe412d27f997ff01f0bc6b67cad3e8965875;hp=353bc9bb51a3e18a5e26fac359dd8aebfdcbbb8e;hb=d99be889bd865f5cdb6a177d50c406448b2be628;hpb=063328d833daa7e06589645e05d4d2e02f55e911 diff --git a/ogg_afh_common.c b/ogg_afh_common.c index 353bc9bb..474bbe41 100644 --- a/ogg_afh_common.c +++ b/ogg_afh_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Andre Noll + * Copyright (C) 2004-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -64,9 +64,8 @@ static int process_ogg_packets(ogg_sync_state *oss, struct afh_info *afhi, ogg_page page; int ret; - ret = -E_SYNC_PAGEOUT; if (ogg_sync_pageout(oss, &page) != 1) - goto out; + return -E_SYNC_PAGEOUT; ret = ogg_page_serialno(&page); ogg_stream_init(&stream, ret); @@ -146,7 +145,7 @@ int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi, goto out; oss.returned = 0; oss.fill = numbytes; - /* count ogg packages and get duration of the file */ + /* count ogg pages and get duration of the file */ for (i = 0; ogg_sync_pageseek(&oss, &op) > 0; i++) num_frames = ogg_page_granulepos(&op); PARA_INFO_LOG("%d pages, %llu frames\n", i, num_frames); @@ -164,7 +163,7 @@ int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi, afhi->chunk_table[1] = afhi->header_len; oss.returned = afhi->header_len; oss.fill = numbytes; - for (i = 0, j = 1; ogg_sync_pageseek(&oss, &op) > 0; i++) { + for (j = 1; ogg_sync_pageseek(&oss, &op) > 0; /* nothing */) { int granule = ogg_page_granulepos(&op); while (granule > j * frames_per_chunk) {