Skip to content

Commit f201b1f

Browse files
authored
Don't leave decoderState null after processing cancelations (#710)
1 parent 85ba088 commit f201b1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/CSFBAudioEngine/Player/AudioPlayer.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,6 @@ bool PerformSeek() noexcept
993993
DecoderState *decoderState = nullptr;
994994
auto ringBufferStale = false;
995995

996-
// Get the earliest decoder state that has not completed rendering
997996
{
998997
std::lock_guard lock{activeDecodersLock_};
999998
decoderState = FirstDecoderStateWithRenderingNotComplete();
@@ -1015,6 +1014,9 @@ bool PerformSeek() noexcept
10151014

10161015
decoderState = FirstDecoderStateFollowingSequenceNumberWithRenderingNotComplete(decoderState->sequenceNumber_);
10171016
}
1017+
1018+
// Get the earliest decoder state that has not completed rendering
1019+
decoderState = FirstDecoderStateWithRenderingNotComplete();
10181020
}
10191021

10201022
// Process pending seeks

0 commit comments

Comments
 (0)