From 5b27eab680d462318866b638d352d48cea5afeec Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 11 Feb 2024 00:48:15 +0100 Subject: [PATCH] Cleanup end detection --- transcoder/src/stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transcoder/src/stream.go b/transcoder/src/stream.go index b68d11c9..35cba9a1 100644 --- a/transcoder/src/stream.go +++ b/transcoder/src/stream.go @@ -191,7 +191,7 @@ func (ts *Stream) run(start int32) error { should_stop = true } else { close(ts.segments[segment]) - if int32(len(ts.segments)) == segment+1 { + if segment == end-1 { // file finished, ffmped will finish soon on it's own should_stop = true } else if ts.isSegmentReady(segment + 1) {