summaryrefslogtreecommitdiffstats
path: root/sub/sd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-26 18:35:36 +0100
committerwm4 <wm4@nowhere>2015-12-26 18:35:36 +0100
commit190dea149aea07bc4be41c684a50db4231ccb0da (patch)
treeb4c164a1c741dd6c2283b3559d3b807b2ca8c226 /sub/sd.h
parent8d4a179c144cb3e36762b2c3cef55d1d3bb9f951 (diff)
downloadmpv-190dea149aea07bc4be41c684a50db4231ccb0da.tar.bz2
mpv-190dea149aea07bc4be41c684a50db4231ccb0da.tar.xz
sub: destroy/recreate ASS_Renderer when disabling/enablings subs
Keeping ASS_Renderers around for a potentially large number of subtitle tracks could lead to excessive memory usage, especially since the libass cache is broken (caches even unneeded data), and might consume up to ~500MB of memory for no reason.
Diffstat (limited to 'sub/sd.h')
-rw-r--r--sub/sd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sub/sd.h b/sub/sd.h
index e4ec2dd357..ce312cca70 100644
--- a/sub/sd.h
+++ b/sub/sd.h
@@ -29,6 +29,7 @@ struct sd_functions {
int (*init)(struct sd *sd);
void (*decode)(struct sd *sd, struct demux_packet *packet);
void (*reset)(struct sd *sd);
+ void (*select)(struct sd *sd, bool selected);
void (*uninit)(struct sd *sd);
bool (*accepts_packet)(struct sd *sd); // implicit default if NULL: true