Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Ogg
Ogg
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Xiph.Org
  • OggOgg
  • Issues
  • #2275

Closed (moved)
Open
Opened 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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xiph/ogg#2275