Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Vorbis Vorbis
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • VorbisVorbis
  • Issues
  • #194

Closed
Open
Created May 20, 2002 by al.faber@al.faber

bm->avg_binacc is not initialized with zeros, resulting in too large ogg files when encodign with fixed bitrate settings

Within the bitrate.c file, the array bm->avg_binacc is allocated (with 
ogg_malloc) but is not initialized. A malloc does not have to initialize 
the allocated memory chunk with zero's (it might be compiler dependent 
though). The behaviour that's observed is that resulting file will be way too 
large when trying to encode with a fixed bitrate (bitrate is increasing 
(drifting) during the encoding process. The solution is to add a the following 
line just after the ogg_malloc:
	(void)memset( bm->avg_binacc, 0,bins*sizeof(*bm->avg_binacc) );
But this problem might be at more places in the code and are very hard to 
track down. So it might be well worth to redirect the ogg_malloc function to a 
calloc function (which is guarenteed to initialize the allocated memory chunk 
with zero's)
Assignee
Assign to
Time tracking