Fix:Android get track offset out of bounds crash

This commit is contained in:
advplyr 2022-08-10 18:33:30 -05:00
parent 40b731534c
commit 62376871e3

View file

@ -91,6 +91,7 @@ class PlaybackSession(
@JsonIgnore
fun getTrackStartOffsetMs(index:Int):Long {
if (index < 0 || index >= audioTracks.size) return 0L
val currentTrack = audioTracks[index]
return (currentTrack.startOffset * 1000L).toLong()
}