diff --git a/inputstream.ffmpegdirect/addon.xml.in b/inputstream.ffmpegdirect/addon.xml.in index 30a08207..006a32f2 100644 --- a/inputstream.ffmpegdirect/addon.xml.in +++ b/inputstream.ffmpegdirect/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/inputstream.ffmpegdirect/changelog.txt b/inputstream.ffmpegdirect/changelog.txt index 443b2a78..36d16344 100644 --- a/inputstream.ffmpegdirect/changelog.txt +++ b/inputstream.ffmpegdirect/changelog.txt @@ -1,3 +1,7 @@ +v22.2.5 +- Fix catchup stream backward skip on EOF near live edge +- Fix 6s close delay on timeshift HLS streams + v22.2.4 - Release diff --git a/src/stream/FFmpegCatchupStream.cpp b/src/stream/FFmpegCatchupStream.cpp index 31e7ee79..754be662 100644 --- a/src/stream/FFmpegCatchupStream.cpp +++ b/src/stream/FFmpegCatchupStream.cpp @@ -122,10 +122,11 @@ DEMUX_PACKET* FFmpegCatchupStream::DemuxRead() { if (!m_lastPacketWasAvoidedEOF) { - Log(LOGLEVEL_INFO, "%s - EOF detected on terminating catchup stream, starting continuing stream at offset: %lld, ending offset approx %lld", __FUNCTION__, m_previousLiveBufferOffset, static_cast(std::time(nullptr) - m_catchupBufferStartTime)); + long long currentDemuxSecs = static_cast(m_currentDemuxTime) / 1000; + Log(LOGLEVEL_INFO, "%s - EOF detected on terminating catchup stream, starting continuing stream at offset: %lld, ending offset approx %lld", __FUNCTION__, currentDemuxSecs, static_cast(std::time(nullptr) - m_catchupBufferStartTime)); m_seekCorrectsEOF = true; - DemuxSeekTime(m_previousLiveBufferOffset * 1000); + DemuxSeekTime(m_currentDemuxTime); m_seekCorrectsEOF = false; } m_lastPacketWasAvoidedEOF = true; diff --git a/src/stream/FFmpegCatchupStream.h b/src/stream/FFmpegCatchupStream.h index df2f493c..6e27d68f 100644 --- a/src/stream/FFmpegCatchupStream.h +++ b/src/stream/FFmpegCatchupStream.h @@ -77,8 +77,8 @@ class FFmpegCatchupStream : public FFmpegStream bool m_isOpeningStream; double m_seekOffset; - double m_pauseStartTime; - double m_currentDemuxTime; + double m_pauseStartTime = 0; + double m_currentDemuxTime = 0; long long m_previousLiveBufferOffset = 0; bool m_lastSeekWasLive = false;