# HG changeset patch # User arpi # Date 1007341397 0 # Node ID ac7ded58b6dfeea478a89801f877ac0d80ad9cb2 # Parent df10916cbd413d4fd39611157298d17d7c9ca0a6 mpeg subtitle flickering patch by Evgeny Chukreev diff -r df10916cbd41 -r ac7ded58b6df mplayer.c --- a/mplayer.c Sun Dec 02 20:36:43 2001 +0000 +++ b/mplayer.c Mon Dec 03 01:03:17 2001 +0000 @@ -391,6 +391,7 @@ #ifdef USE_SUB static subtitle* subtitles=NULL; +float sub_last_pts = -303; #endif static demuxer_t *demuxer=NULL; @@ -2068,7 +2069,10 @@ 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