[ogg-dev] [Schrodinger-devel] ogg dirac granulepos in oggz tools

Conrad Parker conrad at metadecks.org
Fri Nov 14 12:28:02 PST 2008


2008/11/14 David Flynn <davidf+nntp at woaf.net>:
> On 2008-11-13, Conrad Parker <conrad at metadecks.org> wrote:
>> Are the reported granulepos of the packetno 2 and 3 correct? The dt
>> value looks large.
>
> It should be printed as a -ve number, i've obviously made an error.
>
> This will fix it:
>
> Index: src/tools/oggz_tools.c
> ===================================================================
> --- src/tools/oggz_tools.c      (revision 3775)
> +++ src/tools/oggz_tools.c      (working copy)
> @@ -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);
>

thanks, applied in changeset:3779

Conrad.


More information about the ogg-dev mailing list