Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L liboggz
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.OrgXiph.Org
  • liboggz
  • Issues
  • #2
Closed
Open
Issue created Jun 08, 2016 by Brion Vibber@brion

oggz uses reverse calculation for vorbis granulepos when forward calculation would work

When using liboggz with the OGGZ_AUTO option to reconstruct missing granulepos entries, reconstruction for Vorbis audio packets is always done using the reverse calculation from the last packet in a page, and never in the forwards direction.

In slow processing environments (JavaScript cross-compilation on an old 32-bit iPad or iPhone) this can cause demuxing to sometimes spend a couple extra milliseconds processing through the queued future packets doing reverse calculation, from the explicit granulepos at the end of a page back to the first packet in the page.

The forward calculation was disabled in this 2007 commit:

http://git.xiph.org/?p=liboggz.git;a=commit;h=7f016220d96f98dae0519d94bcf88323c002e656

by adding an early 'return -1' into auto_calc_vorbis.

I'm not sure if it was supposed to do that (why keep the unreachable code?) or if that was a test for debugging that got committed by mistake.

If I manually remove the 'return -1', the forward reconstruction happens one packet at a time as I expect it, but I don't know if there's anything else wrong with that formerly-unreachable code.

Assignee
Assign to
Time tracking