From e948b1ae06afaff3e10df4c03a59133fc0b35105 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 9 Dec 2008 04:14:38 +0200 Subject: 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. --- libmpcodecs/dec_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpcodecs/dec_video.c') diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 4259377342..291859abb2 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -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; -- cgit v1.2.3