mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
Work around vo gl/libass subtitle timing problem
vo gl generates bitmaps for EOSD content (libass subtitles) when DRAW_EOSD is called but actual drawing of both EOSD and OSD is done in draw_osd(). Since draw_osd() was called first it drew the EOSD content from the previous frame, so the subtitles were always one frame late. As a simple workaround update EOSD content first, then normal OSD. This makes vo gl work correctly and should have no effect on anything else.
This commit is contained in:
parent
66cefd5f71
commit
e948b1ae06
@ -455,10 +455,10 @@ int filter_video(sh_video_t *sh_video, void *frame, double pts,
|
||||
// apply video filters and call the leaf vo/ve
|
||||
int ret = vf->put_image(vf, mpi, pts);
|
||||
if (ret > 0) {
|
||||
vf->control(vf, VFCTRL_DRAW_OSD, osd);
|
||||
#ifdef CONFIG_ASS
|
||||
vf->control(vf, VFCTRL_DRAW_EOSD, NULL);
|
||||
#endif
|
||||
vf->control(vf, VFCTRL_DRAW_OSD, osd);
|
||||
}
|
||||
|
||||
t2 = GetTimer() - t2;
|
||||
|
Loading…
Reference in New Issue
Block a user