From bc9b8d281aef97b2328f3c6d30dc4fb0f29a97a3 Mon Sep 17 00:00:00 2001 From: CMK Date: Mon, 15 Jul 2024 20:18:41 +0800 Subject: [PATCH] fix: the "ftypiso5" file header cannot be parse issue --- SDWebImageVideoCoder/Classes/SDImageVideoCoder.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SDWebImageVideoCoder/Classes/SDImageVideoCoder.m b/SDWebImageVideoCoder/Classes/SDImageVideoCoder.m index 5b6c4dd..f626d48 100644 --- a/SDWebImageVideoCoder/Classes/SDImageVideoCoder.m +++ b/SDWebImageVideoCoder/Classes/SDImageVideoCoder.m @@ -46,7 +46,8 @@ - (AVFileType)videoContentTypeWithData:(NSData *)data { // MPEG4 NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(4, 8)] encoding:NSASCIIStringEncoding]; if ([testString isEqualToString:@"ftypMSNV"] - || [testString isEqualToString:@"ftypisom"]) { + || [testString isEqualToString:@"ftypisom"] + || [testString isEqualToString:@"ftypiso5"]) { return AVFileTypeMPEG4; } // M4V