summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorzc62 <chenzh1993@gmail.com>2019-02-18 08:01:29 -0500
committersfan5 <sfan5@live.de>2019-02-28 23:23:47 +0100
commitd38c4879d7917933c2711dff9b6b30979133c6c8 (patch)
tree0eab2c649a129426570d0fd77238a672dfb7b5c4 /player/loadfile.c
parent537006965e98255deb6c433c3f715738d9092946 (diff)
downloadmpv-d38c4879d7917933c2711dff9b6b30979133c6c8.tar.bz2
mpv-d38c4879d7917933c2711dff9b6b30979133c6c8.tar.xz
player: do not rebase start time for subtitle streams
As stated in the original commit message, if the demuxer set the start time to the first subtitle packet, the subtitles would be shifted incorrectly. It appears that it is the case for external PGS subtitles. This reverts commit 520fc7403621156676b1ca183aed4911bf6c47b5. Fixes #5485
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 4e764dc403..f1aa29c74b 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -609,7 +609,7 @@ int mp_add_external_file(struct MPContext *mpctx, char *filename,
goto err_out;
enable_demux_thread(mpctx, demuxer);
- if (opts->rebase_start_time)
+ if (filter != STREAM_SUB && opts->rebase_start_time)
demux_set_ts_offset(demuxer, -demuxer->start_time);
bool has_any = false;