Commit f5a8e5fe authored by conrad's avatar conrad

oggz-info, oggz-validate: update internal gp_to_time() for Dirac


git-svn-id: http://svn.annodex.net/liboggz/trunk@3805 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent a8e6597b
......@@ -135,14 +135,18 @@ static ogg_int64_t
gp_to_granule (OGGZ * oggz, long serialno, ogg_int64_t granulepos)
{
int granuleshift;
ogg_int64_t iframe, pframe;
ogg_int64_t iframe, pframe, granule;
granuleshift = oggz_get_granuleshift (oggz, serialno);
iframe = granulepos >> granuleshift;
pframe = granulepos - (iframe << granuleshift);
granule = iframe + pframe;
return (iframe + pframe);
if (oggz_stream_get_content (oggz, serialno) == OGGZ_CONTENT_DIRAC)
granule >>= 9;
return granule;
}
static double
......
......@@ -159,14 +159,18 @@ static ogg_int64_t
gp_to_granule (OGGZ * oggz, long serialno, ogg_int64_t granulepos)
{
int granuleshift;
ogg_int64_t iframe, pframe;
ogg_int64_t iframe, pframe, granule;
granuleshift = oggz_get_granuleshift (oggz, serialno);
iframe = granulepos >> granuleshift;
pframe = granulepos - (iframe << granuleshift);
granule = iframe+pframe;
return (iframe + pframe);
if (oggz_stream_get_content (oggz, serialno) == OGGZ_CONTENT_DIRAC)
granule >>= 9;
return granule;
}
static timestamp_t
......
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