Ignore in progress segment when adding stream recorder lookback (#73604)

This commit is contained in:
uvjustin
2022-06-17 11:07:08 +10:00
committed by GitHub
parent d43178db06
commit f276523ef3

View File

@@ -510,7 +510,7 @@ class Stream:
num_segments = min(int(lookback // hls.target_duration), MAX_SEGMENTS) num_segments = min(int(lookback // hls.target_duration), MAX_SEGMENTS)
# Wait for latest segment, then add the lookback # Wait for latest segment, then add the lookback
await hls.recv() await hls.recv()
recorder.prepend(list(hls.get_segments())[-num_segments:]) recorder.prepend(list(hls.get_segments())[-num_segments - 1 : -1])
async def async_get_image( async def async_get_image(
self, self,