Sfoglia il codice sorgente

Fix multi-plugin cascade when using non-seeking readers

master
parent
commit
6d0166e69b
1 ha cambiato i file con 14 aggiunte e 1 eliminazioni
  1. +14
    -1
      Audio/CogPluginMulti.m

+ 14
- 1
Audio/CogPluginMulti.m Vedi File

@@ -85,7 +85,13 @@ NSArray * sortClassesByPriority(NSArray * theClasses)
for (NSDictionary *obsItem in cachedObservers) {
[theDecoder removeObserver:[obsItem objectForKey:@"observer"] forKeyPath:[obsItem objectForKey:@"keyPath"]];
}
[source seek:0 whence:SEEK_SET];
if (![source seekable]) {
NSURL * url = [source url];
[source close];
[source open:url];
}
else
[source seek:0 whence:SEEK_SET];
}
theDecoder = nil;
return NO;
@@ -179,6 +185,13 @@ NSArray * sortClassesByPriority(NSArray * theClasses)
NSDictionary * data = [reader propertiesForSource:source];
if ([data count])
return data;
if (![source seekable]) {
NSURL * url = [source url];
[source close];
[source open:url];
}
else
[source seek:0 whence:SEEK_SET];
}
return nil;
}


Loading…
Annulla
Salva