Explorar el Código

Fix multi-plugin cascade when using non-seeking readers

master
Christopher Snowhill hace 3 meses
padre
commit
6d0166e69b
Se han modificado 1 ficheros con 14 adiciones y 1 borrados
  1. +14
    -1
      Audio/CogPluginMulti.m

+ 14
- 1
Audio/CogPluginMulti.m Ver fichero

@@ -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;
}


Cargando…
Cancelar
Guardar