Fix multi-plugin cascade when using non-seeking readers
This commit is contained in:
parent
443aa05f88
commit
6d0166e69b
1 changed files with 14 additions and 1 deletions
|
@ -85,6 +85,12 @@ NSArray * sortClassesByPriority(NSArray * theClasses)
|
||||||
for (NSDictionary *obsItem in cachedObservers) {
|
for (NSDictionary *obsItem in cachedObservers) {
|
||||||
[theDecoder removeObserver:[obsItem objectForKey:@"observer"] forKeyPath:[obsItem objectForKey:@"keyPath"]];
|
[theDecoder removeObserver:[obsItem objectForKey:@"observer"] forKeyPath:[obsItem objectForKey:@"keyPath"]];
|
||||||
}
|
}
|
||||||
|
if (![source seekable]) {
|
||||||
|
NSURL * url = [source url];
|
||||||
|
[source close];
|
||||||
|
[source open:url];
|
||||||
|
}
|
||||||
|
else
|
||||||
[source seek:0 whence:SEEK_SET];
|
[source seek:0 whence:SEEK_SET];
|
||||||
}
|
}
|
||||||
theDecoder = nil;
|
theDecoder = nil;
|
||||||
|
@ -179,6 +185,13 @@ NSArray * sortClassesByPriority(NSArray * theClasses)
|
||||||
NSDictionary * data = [reader propertiesForSource:source];
|
NSDictionary * data = [reader propertiesForSource:source];
|
||||||
if ([data count])
|
if ([data count])
|
||||||
return data;
|
return data;
|
||||||
|
if (![source seekable]) {
|
||||||
|
NSURL * url = [source url];
|
||||||
|
[source close];
|
||||||
|
[source open:url];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[source seek:0 whence:SEEK_SET];
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue