Commit 567a8863 authored by shans's avatar shans

git-svn-id: http://svn.annodex.net/liboggz/trunk@2376 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 5f18d370
Import('libenv')
liboggz = libenv.SharedLibrary ('liboggz', Split("""
oggz.c oggz_io.c oggz_read.c oggz_write.c
oggz_seek.c oggz_auto.c oggz_stream.c
oggz_table.c oggz_vector.c metric_internal.c
"""))
Default(liboggz)
This diff is collapsed.
......@@ -245,6 +245,16 @@ int oggz_purge (OGGZ * oggz);
int oggz_auto_get_granulerate (OGGZ * oggz, ogg_packet * op, long serialno,
void * user_data);
int
oggz_set_granulerate (OGGZ * oggz, long serialno,
ogg_int64_t granule_rate_numerator,
ogg_int64_t granule_rate_denominator);
int
oggz_get_granulerate (OGGZ * oggz, long serialno,
ogg_int64_t * granulerate_n,
ogg_int64_t * granulerate_d);
/* oggz_io */
size_t oggz_io_read (OGGZ * oggz, void * buf, size_t n);
size_t oggz_io_write (OGGZ * oggz, void * buf, size_t n);
......
......@@ -296,7 +296,10 @@ oggz_read_sync (OGGZ * oggz)
granulepos = op->granulepos;
content = oggz_stream_get_content(oggz, serialno);
/*
* if we have no metrics for this stream yet, then generate them
*/
if
(
(!stream->metric || (content == OGGZ_CONTENT_SKELETON))
......@@ -317,8 +320,9 @@ oggz_read_sync (OGGZ * oggz)
stream->last_granulepos = reader->current_granulepos;
/* set unit on last packet of page */
if ((oggz->metric || stream->metric) && granulepos != -1) {
reader->current_unit = oggz_get_unit (oggz, serialno, granulepos);
if ((oggz->metric || stream->metric) && reader->current_granulepos != -1) {
reader->current_unit = oggz_get_unit (oggz, serialno,
reader->current_granulepos);
}
if (stream->read_packet) {
......@@ -372,9 +376,9 @@ oggz_read_sync (OGGZ * oggz)
stream->page_granulepos = granulepos;
if ((oggz->metric || stream->metric) && granulepos != -1) {
reader->current_unit = oggz_get_unit (oggz, serialno, granulepos);
reader->current_unit = oggz_get_unit (oggz, serialno, granulepos);
} else if (granulepos == 0) {
reader->current_unit = 0;
reader->current_unit = 0;
}
}
......
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