瀏覽代碼

Fix multi-plugin cascade when using non-seeking readers

master
Christopher Snowhill 3 月之前
父節點
當前提交
6d0166e69b
共有 1 個檔案被更改,包括 14 行新增1 行删除
  1. +14
    -1
      Audio/CogPluginMulti.m

+ 14
- 1
Audio/CogPluginMulti.m 查看文件

@@ -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…
取消
儲存