Fix iOS load bug with out of range index.
This commit is contained in:
parent
15c77fd38f
commit
62fe5b6ab9
|
@ -344,7 +344,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)getDuration {
|
- (int)getDuration {
|
||||||
if (_processingState == none) {
|
if (_processingState == none || _processingState == loading) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (_indexedAudioSources && _indexedAudioSources.count > 0) {
|
} else if (_indexedAudioSources && _indexedAudioSources.count > 0) {
|
||||||
int v = (int)(1000 * CMTimeGetSeconds(_indexedAudioSources[_index].duration));
|
int v = (int)(1000 * CMTimeGetSeconds(_indexedAudioSources[_index].duration));
|
||||||
|
|
Loading…
Reference in New Issue