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 378ada847c ("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.
This commit is contained in:
Uoti Urpala 2011-09-23 13:57:11 +03:00
parent e35362f507
commit 0383070588
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}