From 533887a41fbb9a9223f8ce2802c579e8af455dbd Mon Sep 17 00:00:00 2001 From: conrad Date: Sun, 10 Apr 2005 04:08:49 +0000 Subject: [PATCH] oggzinfo: Fix calculation of content duration. Previously, oggz_seek(oggz, SEEK_END) was used to seek to the start of the last packet. However, for packets which span multiple pages (such as huge theora frames), you would then need to scan forward to find its granulepos. We could have done this, but here we take advantage of the fact that we are already at the end of the file after pass1, so we can just call oggz_tell_units(oggz) to get the granulepos of the last packet. Closes ticket:117 git-svn-id: http://svn.annodex.net/liboggz/trunk@1229 8158c8cd-e7e1-0310-9fa4-c5954c97daef --- src/tools/oggzinfo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tools/oggzinfo.c b/src/tools/oggzinfo.c index 13d4483..f1b81bb 100644 --- a/src/tools/oggzinfo.c +++ b/src/tools/oggzinfo.c @@ -494,7 +494,6 @@ main (int argc, char ** argv) oi_pass1 (oggz, &info); - oggz_seek_units (oggz, 0, SEEK_END); info.duration = oggz_tell_units (oggz); oi_pass2 (oggz, &info); -- GitLab