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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -510,7 +510,7 @@ class Stream:
num_segments = min(int(lookback // hls.target_duration), MAX_SEGMENTS)
# Wait for latest segment, then add the lookback
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(
self,