Fix iOS load bug with out of range index.

This commit is contained in:
Ryan Heise 2020-11-19 00:11:55 +11:00
parent 15c77fd38f
commit 62fe5b6ab9
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@
}
- (int)getDuration {
if (_processingState == none) {
if (_processingState == none || _processingState == loading) {
return -1;
} else if (_indexedAudioSources && _indexedAudioSources.count > 0) {
int v = (int)(1000 * CMTimeGetSeconds(_indexedAudioSources[_index].duration));