CogDecoderMulti: Reset file even if not seekable

HTTP Reader now supports limited seeking backwards even in streams, so
seek back to file start for repeated file tests, since there are at
least a few inputs that all claim to support things like Ogg containers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2022-02-09 13:44:04 -08:00
parent d77a5472f3
commit cdf27e4786

View file

@ -90,8 +90,8 @@ NSArray *sortClassesByPriority(NSArray *theClasses) {
if([theDecoder open:source]) if([theDecoder open:source])
return YES; return YES;
[self removeObservers]; [self removeObservers];
if([source seekable]) // HTTP reader supports limited rewinding
[source seek:0 whence:SEEK_SET]; [source seek:0 whence:SEEK_SET];
} }
theDecoder = nil; theDecoder = nil;
return NO; return NO;