[xiph-commits] r3779 - liboggz/trunk/src/tools

conrad at svn.annodex.net conrad at svn.annodex.net
Fri Nov 14 12:26:33 PST 2008


Author: conrad
Date: 2008-11-14 12:26:32 -0800 (Fri, 14 Nov 2008)
New Revision: 3779

Modified:
   liboggz/trunk/src/tools/oggz_tools.c
Log:
oggz-tools: Handle dirac dt as a signed number, to allow negative values.
Patch from David Flynn, from discussion at
http://lists.xiph.org/pipermail/ogg-dev/2008-November/001264.html


Modified: liboggz/trunk/src/tools/oggz_tools.c
===================================================================
--- liboggz/trunk/src/tools/oggz_tools.c	2008-11-14 08:48:07 UTC (rev 3778)
+++ liboggz/trunk/src/tools/oggz_tools.c	2008-11-14 20:26:32 UTC (rev 3779)
@@ -460,7 +460,7 @@
       uint32_t pt = (iframe + pframe) >> 9;
       uint16_t dist = ((iframe & 0xff) << 8) | (pframe & 0xff);
       uint16_t delay = pframe >> 9;
-      int64_t dt = pt - delay;
+      int64_t dt = (int64_t)pt - delay;
       ret = fprintf (stream,
 		     "(pt:%u,dt:%" PRId64 ",dist:%hu,delay:%hu)",
 		     pt, dt, dist, delay);



More information about the commits mailing list