summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-09-23 13:57:11 +0300
committerUoti Urpala <uau@mplayer2.org>2011-09-23 13:57:11 +0300
commit0383070588aff3313de70d90478fd607c6c442ff (patch)
tree5f9abfb607f5f2f0142a0be9d2ab6a0f316fe3e9 /sub
parente35362f507ae854341577a4f2fb1cade41b0ad83 (diff)
downloadmpv-0383070588aff3313de70d90478fd607c6c442ff.tar.bz2
mpv-0383070588aff3313de70d90478fd607c6c442ff.tar.xz
sd_ass.c: set event->Style to fix --ass-styles
Set the "Style" attribute for subtitle events created in sd_ass to match the "default_style" attribute of the track. This is required to make --ass-styles work with recent libass versions (otherwise the event would use style 0, which is a fallback style added by libass now). Commit 378ada847c8eb3a641392691b1a2317f8fc214e0 ("sub/ass: use default style, not first style unconditionally") fixed the same issue for external subtitles converted with mp_ass_read_subdata(); this commit fixes it for muxed ones.
Diffstat (limited to 'sub')
-rw-r--r--sub/sd_ass.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sub/sd_ass.c b/sub/sd_ass.c
index 0e15a7e28b..69587646e4 100644
--- a/sub/sd_ass.c
+++ b/sub/sd_ass.c
@@ -121,6 +121,7 @@ static void decode(struct sh_sub *sh, struct osd_state *osd, void *data,
ASS_Event *event = track->events + eid;
event->Start = ipts;
event->Duration = iduration;
+ event->Style = track->default_style;
event->Text = strdup(buf);
}