Fix multi-plugin cascade to handle non-seeking readers, where disposing of some data while finding an input is okay
parent
58b435dd88
commit
117ab53343
|
@ -85,12 +85,7 @@ 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]) {
|
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;
|
||||||
|
@ -185,12 +180,7 @@ 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]) {
|
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];
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
|
|
Loading…
Reference in New Issue