Browse Source

Fix multi-plugin cascade when using non-seeking readers

master
Christopher Snowhill 3 weeks ago
parent
commit
6d0166e69b
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      Audio/CogPluginMulti.m

+ 14
- 1
Audio/CogPluginMulti.m View 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…
Cancel
Save