Commit 533887a4 authored by conrad's avatar conrad
Browse files

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: 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent aef5c186
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment