[xiph-commits] r3491 - in liboggz/trunk: doc src/tools
conrad at svn.annodex.net
conrad at svn.annodex.net
Sun Feb 24 00:00:00 PST 2008
Author: conrad
Date: 2008-02-24 00:00:00 -0800 (Sun, 24 Feb 2008)
New Revision: 3491
Modified:
liboggz/trunk/doc/oggz-sort.1.sgml
liboggz/trunk/src/tools/oggz-sort.c
Log:
document fixing of incorrect granulepos on pages with no completed packets
Modified: liboggz/trunk/doc/oggz-sort.1.sgml
===================================================================
--- liboggz/trunk/doc/oggz-sort.1.sgml 2008-02-24 07:47:55 UTC (rev 3490)
+++ liboggz/trunk/doc/oggz-sort.1.sgml 2008-02-24 08:00:00 UTC (rev 3491)
@@ -96,9 +96,17 @@
the files are viewed on low-memory devices.
</para>
<para>
+ Some older Ogg encoders also produce pages which incorrectly have
+ granulepos timestamps recorded that shouldn't be: pages which have no
+ completed packets must have a granulepos of -1.
+ <command>oggz-sort</command> will correct such granulepos during the
+ process of sorting.
+ </para>
+ <para>
The tool <command>oggz-validate</command> can be used to check the
- relative ordering of packets in a file. If out of order packets are
- reported, use <command>oggz-sort</command> to fix the problem.
+ relative ordering of packets in a file, and also to detect incorrect
+ granulepos on pages with no completed packets. If either of these errors
+ are reported, or use <command>oggz-sort</command> to fix the problem.
</para>
</refsect1>
Modified: liboggz/trunk/src/tools/oggz-sort.c
===================================================================
--- liboggz/trunk/src/tools/oggz-sort.c 2008-02-24 07:47:55 UTC (rev 3490)
+++ liboggz/trunk/src/tools/oggz-sort.c 2008-02-24 08:00:00 UTC (rev 3491)
@@ -152,6 +152,8 @@
if (serialno == input->serialno) {
ogg_page *iog;
iog = _ogg_page_copy (og);
+ /* If this page's granulepos should be -1 but isn't then fix that before
+ * storing and sorting the page. */
if(ogg_page_packets(iog)==0&&ogg_page_granulepos(iog)!=-1) {
memset(iog->header+6,0xFF,8);
ogg_page_checksum_set(iog);
More information about the commits
mailing list