Fixed end of playlist crash.

CQTexperiment
vspader 2007-10-13 08:25:44 +00:00
parent fc9069d7c7
commit c76c95529a
1 changed files with 10 additions and 4 deletions

View File

@ -158,8 +158,11 @@
- (void)setShouldContinue:(BOOL)s - (void)setShouldContinue:(BOOL)s
{ {
[bufferChain setShouldContinue:s]; if (bufferChain)
[output setShouldContinue:s]; [bufferChain setShouldContinue:s];
if (output)
[output setShouldContinue:s];
} }
- (double)amountPlayed - (double)amountPlayed
@ -256,16 +259,19 @@
- (void)endOfInputPlayed - (void)endOfInputPlayed
{ {
[bufferChain release];
if ([chainQueue count] <= 0) if ([chainQueue count] <= 0)
{ {
//End of playlist //End of playlist
[self stop]; [self stop];
[bufferChain release];
bufferChain = nil;
return; return;
} }
[bufferChain release];
@synchronized(chainQueue) { @synchronized(chainQueue) {
bufferChain = [chainQueue objectAtIndex:0]; bufferChain = [chainQueue objectAtIndex:0];
[bufferChain retain]; [bufferChain retain];