mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
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.
This commit is contained in:
parent
e35362f507
commit
0383070588
@ -121,6 +121,7 @@ static void decode(struct sh_sub *sh, struct osd_state *osd, void *data,
|
|||||||
ASS_Event *event = track->events + eid;
|
ASS_Event *event = track->events + eid;
|
||||||
event->Start = ipts;
|
event->Start = ipts;
|
||||||
event->Duration = iduration;
|
event->Duration = iduration;
|
||||||
|
event->Style = track->default_style;
|
||||||
event->Text = strdup(buf);
|
event->Text = strdup(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user