[Playback] Prevent erroneous file from repeating
Prevent Repeat Single from locking up the player on an unplayable file. Signed-off-by: Christopher Snowhill <kode54@gmail.com>xcode15
parent
8f4fb4a44c
commit
adc159eb05
|
@ -90,6 +90,10 @@
|
||||||
|
|
||||||
[self requestNextStream:userInfo];
|
[self requestNextStream:userInfo];
|
||||||
|
|
||||||
|
if([nextStream isEqualTo:url]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
url = nextStream;
|
url = nextStream;
|
||||||
if(url == nil) {
|
if(url == nil) {
|
||||||
return;
|
return;
|
||||||
|
@ -398,7 +402,9 @@
|
||||||
|
|
||||||
lastChain = nil;
|
lastChain = nil;
|
||||||
|
|
||||||
while(shouldContinue && ![newChain open:nextStream withUserInfo:nextStreamUserInfo withRGInfo:nextStreamRGInfo]) {
|
NSURL *url = nextStream;
|
||||||
|
|
||||||
|
while(shouldContinue && ![newChain open:url withUserInfo:nextStreamUserInfo withRGInfo:nextStreamRGInfo]) {
|
||||||
if(nextStream == nil) {
|
if(nextStream == nil) {
|
||||||
newChain = nil;
|
newChain = nil;
|
||||||
atomic_fetch_sub(&refCount, 1);
|
atomic_fetch_sub(&refCount, 1);
|
||||||
|
@ -408,6 +414,14 @@
|
||||||
newChain = nil;
|
newChain = nil;
|
||||||
[self requestNextStream:nextStreamUserInfo];
|
[self requestNextStream:nextStreamUserInfo];
|
||||||
|
|
||||||
|
if([nextStream isEqualTo:url]) {
|
||||||
|
newChain = nil;
|
||||||
|
atomic_fetch_sub(&refCount, 1);
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
url = nextStream;
|
||||||
|
|
||||||
newChain = [[BufferChain alloc] initWithController:self];
|
newChain = [[BufferChain alloc] initWithController:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue