summaryrefslogtreecommitdiffstats
path: root/sub/ass_mp.c
Commit message (Collapse)AuthorAgeFilesLines
* subs: only use "subfont.ttf" as libass fallback if it existsUoti Urpala2012-04-141-1/+6
| | | | | | | | | | Libass was set to use the file "subfont.ttf" in the user configuration directory as a default/fallback font. This triggered "Error opening font" errors from libass if it tried to use the fallback font for some glyph and the user had not copied/linked any font there (and there is generally little reason to do that nowadays when using fontconfig). Check whether the path exists and only set it in ass_set_fonts() if it does.
* options: move libass-related options to structUoti Urpala2011-09-031-38/+25
|
* subs: libass: apply option changes to all track typesUoti Urpala2011-08-081-5/+1
| | | | | | | | | Libass rendering uses two renderer objects to support both VSFilter aspect ratio (mis)behavior emulation and correct rendering. When option values were changed during playback the changes were applied to the renderer used for the currently active track only, and old values could be used if the user then switched to a track using the other renderer object. Fix to update both renderers.
* subs: libass: remove bad ass_set_margins() on settings resetUoti Urpala2011-08-081-1/+4
| | | | | | | | | | | When libass-related options were changed at runtime, the reinitilization code executed ass_set_margins() with arguments that were correct for the vf_ass case but wrong for EOSD. This could cause the subtitles to be displayed incorrectly for one frame (vf_vo would run ass_set_margins() again with the correct parameters for the next frame). The call is actually redundant for the vf_ass case too as it's currently not possible to modify the margins during playback, so fix the problem by disabling the call.
* cleanup: move global ass_force_reload to struct osd_stateUoti Urpala2011-08-081-11/+8
|
* subs: fix per-file --ass-force-styleUoti Urpala2011-07-231-2/+0
| | | | | | | | | | | | | The --ass-force-style option was only applied when the main libass library handle was created. Thus any per-file option changes later had no effect. Do the ass_set_style_overrides() call in per-file initialization instead so that possible changes will be applied. Also move the option variable to the option struct. Current libass will crash (usually) if you set style overrides to a nonempty value, then an empty one. It'll be easier to trigger this bug after this commit, but the problem is not on mplayer2 side. The fix is trivial so hopefully there will be a fixed libass soon.
* cleanup: subs: remove global ass_library variableUoti Urpala2011-07-231-1/+0
|
* sub/ass: use default style, not first style unconditionallyGrigori Goronzy2011-06-141-1/+2
| | | | | | | Turns out it's a bad idea to just always unconditionally use the first style. Make mplayer2 use and set the style according to the track's default_style property. Fixes the -ass-styles option broken with recent libass versions (ticket #40).
* stream.[ch], ass_mp: new stream function for whole-file readsUoti Urpala2011-03-031-34/+12
| | | | | | Add new stream_read_complete() function which reads the complete contents of file. Use that in ass_mp.c which had custom code to do the same.
* sub/OSD: move some related files to sub/Uoti Urpala2011-01-261-0/+355