Skip to content

Conversation

@mon
Copy link

@mon mon commented Feb 19, 2016

Fixes #9.

ogg_sync_destroy frees ogg->state, which is then freed again by free(ogg). By allocating this separately and letting libogg free it this is avoided.

ogg_stream_init allocates 3 buffers, which are not properly freed. By separately allocating ogg->stream and calling ogg_stream_destroy, these are properly freed. Saves ~26kb of lost memory.

Finally, libogg recommends ogg_sync_pageout be called before ogg_sync_buffer to initialise some buffers. Added a call to it inside AVOggInit to follow this recommendation.

@Kukunin
Copy link

Kukunin commented Oct 15, 2018

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants