From e3da3473cc405bcbe80c067b1182aec72e58901f Mon Sep 17 00:00:00 2001 From: arpi Date: Mon, 3 Dec 2001 01:03:17 +0000 Subject: [PATCH] mpeg subtitle flickering patch by Evgeny Chukreev git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3275 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mplayer.c b/mplayer.c index 21773569a2..fb3cf18444 100644 --- a/mplayer.c +++ b/mplayer.c @@ -391,6 +391,7 @@ int main(int argc,char* argv[], char *envp[]){ #ifdef USE_SUB static subtitle* subtitles=NULL; +float sub_last_pts = -303; #endif static demuxer_t *demuxer=NULL; @@ -2068,7 +2069,10 @@ if(rel_seek_secs || abs_seek_pos){ float pts=d_video->pts; if(sub_fps==0) sub_fps=sh_video->fps; current_module="find_sub"; - find_sub(subtitles,sub_uses_time?(100*(pts+sub_delay)):((pts+sub_delay)*sub_fps)); // FIXME! frame counter... + if (pts > sub_last_pts || pts < sub_last_pts-1.0 ) { + find_sub(subtitles,sub_uses_time?(100*(pts+sub_delay)):((pts+sub_delay)*sub_fps)); // FIXME! frame counter... + sub_last_pts = pts; + } current_module=NULL; } #endif