Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ass_set_cache_limits() to work with composite cache #249

Closed
wants to merge 1 commit into from

Conversation

MrSmile
Copy link
Member

@MrSmile MrSmile commented Nov 6, 2016

I've not tested this (does mpv have setting for libass cache size?) so people who knows software that relies on ass_set_cache_limits are welcomed.

@astiob
Copy link
Member

astiob commented Nov 6, 2016

Seems sensible.


size_t bitmap_cache, composite_cache;
if (bitmap_max) {
bitmap_cache = 1048576 * (size_t) bitmap_max;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s been asked on IRC that 1048576 should be made a macro here, perhaps named something like BITMAP_CACHE_SIZE_UNIT. I realize this commit doesn’t introduce this constant, but it seems like a good opportunity to name it and make it just a bit more obvious how the cache size is configured.

Previously was possible to set only bitmap_max_size,
now requested memory amount is divided between
bitmap_max_size and composite_max_size.
@MrSmile MrSmile closed this Dec 28, 2016
@MrSmile MrSmile deleted the cache-limits branch December 28, 2016 23:47
@astiob
Copy link
Member

astiob commented Dec 28, 2016

(Merged in 3ba18f6.)

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.

None yet

2 participants