diff options
author | CastagnaIT <gottardo.stefano.83@gmail.com> | 2023-04-10 13:36:01 +0200 |
---|---|---|
committer | CastagnaIT <gottardo.stefano.83@gmail.com> | 2023-04-10 13:36:01 +0200 |
commit | c3d8a5994295c968932c986e680e26a0e7ffb42d (patch) | |
tree | 59c8b26ee65603f63a28bea0097bc95157baeace | |
parent | 5fb4f90d2c6aff0fa66677f09b5a94c4b2a842c4 (diff) |
[Subtitles][WebVTT] Fix reversed pts offset correction
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDCodecs/Overlay/OverlayCodecWebVTT.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/OverlayCodecWebVTT.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/OverlayCodecWebVTT.cpp index 1e3bab67df..7e784a619b 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/OverlayCodecWebVTT.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/OverlayCodecWebVTT.cpp @@ -66,7 +66,11 @@ OverlayMessage COverlayCodecWebVTT::Decode(DemuxPacket* pPacket) m_webvttHandler.Reset(); - m_webvttHandler.SetPeriodStart(pPacket->m_ptsOffsetCorrection); + // WebVTT subtitles has no relation with packet PTS then if + // a period/chapter change happens (e.g. HLS streaming) VP can detect a discontinuity + // and adjust the packet PTS by substracting the pts offset correction value, + // so here we have to adjust WebVTT subtitles PTS by substracting it at same way + m_webvttHandler.SetPeriodStart(pPacket->m_ptsOffsetCorrection * -1); if (m_isISOFormat) { |