Commit 7f016220 authored by shans's avatar shans

Some minor adjustments to work around Yet More problems with ogg

granulepos values.


git-svn-id: http://svn.annodex.net/liboggz/trunk@3278 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 17bf9c33
......@@ -687,6 +687,8 @@ auto_calc_vorbis(ogg_int64_t now, oggz_stream_t *stream, ogg_packet *op) {
info = (auto_calc_vorbis_info_t *)stream->calculate_data;
return -1;
{
/*
* we're in a data packet! First we need to get the mode of the packet,
......
......@@ -419,6 +419,11 @@ oggz_read_sync (OGGZ * oggz)
if (oggz->flags & OGGZ_AUTO) {
reader->current_granulepos =
oggz_auto_calculate_granulepos (content, granulepos, stream, op);
/* make sure that we accept any "real" gaps in the granulepos
*/
if (granulepos != -1 && reader->current_granulepos < granulepos) {
reader->current_granulepos = granulepos;
}
} else {
reader->current_granulepos = granulepos;
}
......
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