Skip to content

Commit 3c53e6c

Browse files
committed
Fix readySegment 0
1 parent 1862500 commit 3c53e6c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/GStreamer/Services/GStask.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ public Segment GetSegment(int index, CancellationToken ct, int audio = 0)
507507
}
508508
#endregion
509509

510-
if (index != -1 && readySegment.index == index && readySegment.complete)
510+
if (readySegment.index == index && readySegment.complete)
511511
return readySegment.seg;
512512

513513
mp4Reader.ResetSegment();
@@ -538,7 +538,7 @@ public Segment GetSegment(int index, CancellationToken ct, int audio = 0)
538538

539539
if (readySegment.complete)
540540
{
541-
readySegment.index = index;
541+
readySegment.index = index > 0 ? index : 0;
542542
return readySegment.seg;
543543
}
544544
}

0 commit comments

Comments
 (0)