diff --git a/transcoder/src/stream.go b/transcoder/src/stream.go index e3c693b0..8dfcff07 100644 --- a/transcoder/src/stream.go +++ b/transcoder/src/stream.go @@ -222,7 +222,7 @@ func (ts *Stream) GetSegment(segment int32) (string, error) { distance := 0. if !ready { distance = ts.getMinEncoderDistance(segment) - } else { + } else if !slices.Contains(ts.heads, segment) { // if the current segment is ready, check next segments are ready and if not start a transcode for them for i := segment + 1; i <= min(segment+10, int32(len(ts.segments)-1)); i++ { if slices.Contains(ts.heads, i) {