mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 06:03:45 +01:00
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.
This commit is contained in:
parent
b26fbeddd8
commit
f95674fb6c
12
mpcommon.c
12
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:
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
struct subtitle;
|
||||
|
||||
extern double sub_last_pts;
|
||||
extern struct ass_track *ass_track;
|
||||
extern struct subtitle *vo_sub_last;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user