Commit Graph

9 Commits

Author SHA1 Message Date
Uoti Urpala 83fc5b6004 options: move libass-related options to struct 2011-09-03 14:26:14 +03:00
Uoti Urpala 8d1e5354e4 subs: libass: apply option changes to all track types
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.
2011-08-08 07:02:01 +03:00
Uoti Urpala f5d493d017 subs: libass: remove bad ass_set_margins() on settings reset
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.
2011-08-08 06:01:05 +03:00
Uoti Urpala 9920d64650 cleanup: move global ass_force_reload to struct osd_state 2011-08-08 05:59:23 +03:00
Uoti Urpala 99d9e56e27 subs: fix per-file --ass-force-style
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.
2011-07-23 05:35:26 +03:00
Uoti Urpala 91d6bca695 cleanup: subs: remove global ass_library variable 2011-07-23 01:55:13 +03:00
Grigori Goronzy 378ada847c sub/ass: use default style, not first style unconditionally
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).
2011-06-14 20:01:19 +03:00
Uoti Urpala 4c117849b3 stream.[ch], ass_mp: new stream function for whole-file reads
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.
2011-03-03 21:39:24 +02:00
Uoti Urpala c9026cb321 sub/OSD: move some related files to sub/ 2011-01-26 20:39:05 +02:00