diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-16 12:30:34 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-16 12:44:00 +0200 |
commit | 6ead3e936b8344d13c56567142d95cff0d4d8c90 (patch) | |
tree | 6e467794305e07401e1332221f09833fab7a0ff2 /cfg-mplayer.h | |
parent | c5bd47f54380b55a9fefe1e922a64a3a96b773ac (diff) | |
download | mpv-6ead3e936b8344d13c56567142d95cff0d4d8c90.tar.bz2 mpv-6ead3e936b8344d13c56567142d95cff0d4d8c90.tar.xz |
subreader.c: fix excessive memory use with some external subtitles
For each sequence of consecutive partially overlapping subtitles, the
algorithm calculating screen positions for the subtitles allocated a
2*subtitle_count*subtitle_line_count array. With some karaoke
subtitles that had lots of rapidly changing overlapping subtitles this
became large enough to use gigabytes of memory. Make the behavior
saner by limiting the line count to SUB_MAX_TEXT lines (the maximum
number of lines to show on screen at once, currently 12). This
shouldn't change the end result of the algorithm other than possibly
printing different warnings.
Diffstat (limited to 'cfg-mplayer.h')
0 files changed, 0 insertions, 0 deletions