Commit e6e980fe authored by Michael Smith's avatar Michael Smith

Make this work right....

svn path=/trunk/vorbis-tools/; revision=12159
parent c0d0ac04
......@@ -429,22 +429,10 @@ static void theora_process(stream_processor *stream, ogg_page *page)
}
}
}
}
if(!header) {
else {
ogg_int64_t framenum;
ogg_int64_t iframe,pframe;
ogg_int64_t gp = ogg_page_granulepos(page);
if(gp > 0) {
if(gp < inf->lastgranulepos)
warn(_("Warning: granulepos in stream %d decreases from %"
I64FORMAT " to %" I64FORMAT "\n"),
stream->num, inf->lastgranulepos, gp);
inf->lastgranulepos = gp;
}
if(inf->firstgranulepos < 0) { /* Not set yet */
}
inf->bytes += page->header_len + page->body_len;
ogg_int64_t gp = packet.granulepos;
if(gp > 0) {
iframe=gp>>inf->ti.granule_shift;
......@@ -459,6 +447,24 @@ static void theora_process(stream_processor *stream, ogg_page *page)
}
inf->framenum_expected = framenum + 1;
}
else if (inf->framenum_expected >= 0) {
inf->framenum_expected++;
}
}
}
if(!header) {
ogg_int64_t gp = ogg_page_granulepos(page);
if(gp > 0) {
if(gp < inf->lastgranulepos)
warn(_("Warning: granulepos in stream %d decreases from %"
I64FORMAT " to %" I64FORMAT "\n"),
stream->num, inf->lastgranulepos, gp);
inf->lastgranulepos = gp;
}
if(inf->firstgranulepos < 0) { /* Not set yet */
}
inf->bytes += page->header_len + page->body_len;
}
}
......
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