From f95674fb6cbd459e6b484caf94b490b7efede9d5 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 11 Jan 2011 17:35:28 +0200 Subject: subtitles: remove sub_last_pts hack This code was probably added because of bad pts handling in old timing code, and should not be needed any more. --- mpcommon.c | 12 +++--------- mpcommon.h | 1 - 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/mpcommon.c b/mpcommon.c index a5e71b839e..a7e89d9ee1 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -40,8 +40,6 @@ #include "ffmpeg_files/intreadwrite.h" #include "m_option.h" -double sub_last_pts = -303; - #ifdef CONFIG_ASS #include "ass_mp.h" ASS_Track *ass_track = 0; // current track to render @@ -128,13 +126,9 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts, if (subdata) { if (sub_fps==0) sub_fps = sh_video ? sh_video->fps : 25; current_module = "find_sub"; - if (refpts > sub_last_pts || refpts < sub_last_pts-1.0) { - find_sub(mpctx, subdata, curpts * - (subdata->sub_uses_time ? 100. : sub_fps)); - if (vo_sub) vo_sub_last = vo_sub; - // FIXME! frame counter... - sub_last_pts = refpts; - } + find_sub(mpctx, subdata, curpts * + (subdata->sub_uses_time ? 100. : sub_fps)); + if (vo_sub) vo_sub_last = vo_sub; } // DVD sub: diff --git a/mpcommon.h b/mpcommon.h index 5f11c5e458..e0baee4f8d 100644 --- a/mpcommon.h +++ b/mpcommon.h @@ -23,7 +23,6 @@ struct subtitle; -extern double sub_last_pts; extern struct ass_track *ass_track; extern struct subtitle *vo_sub_last; -- cgit v1.2.3