From 14e6f51007274a716ce2711c9b47c8e55e660e77 Mon Sep 17 00:00:00 2001 From: qianlongxu Date: Mon, 21 Oct 2024 18:51:46 +0800 Subject: [PATCH] #52, fix http_seek cause 401 authentication bug --- CHANGELOG.md | 1 + FFToolChain | 2 +- examples/macos/IJKMediaDemo/MRRootViewController.m | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13bb4a224b..55b31b2e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ tag k0.11.8 - add builtin smb2 protocol - move “application.h” to “libavformat” directory - support Network or Local Blu-ray Disc/BDMV +- fix http_seek cause 401 authentication bug,#52 tag k0.11.7 -------------------------------- diff --git a/FFToolChain b/FFToolChain index 16511b4e59..976e986931 160000 --- a/FFToolChain +++ b/FFToolChain @@ -1 +1 @@ -Subproject commit 16511b4e59736dfc68861ff673e55a2fc9d856ca +Subproject commit 976e986931576d8a9f6cabc9b87b0b8c0104bab6 diff --git a/examples/macos/IJKMediaDemo/MRRootViewController.m b/examples/macos/IJKMediaDemo/MRRootViewController.m index 5f8e00a60a..51d01cf1ac 100644 --- a/examples/macos/IJKMediaDemo/MRRootViewController.m +++ b/examples/macos/IJKMediaDemo/MRRootViewController.m @@ -640,6 +640,8 @@ - (void)perpareIJKPlayer:(NSURL *)url hwaccel:(BOOL)hwaccel isLive:(BOOL)isLive [options setPlayerOptionIntValue:1500 forKey:@"accurate-seek-timeout"]; options.metalRenderer = ![MRCocoaBindingUserDefault use_opengl]; options.showHudView = self.shouldShowHudView; + //作用有限,重定向后就失效了,变成了自动判断 + [options setFormatOptionValue:@"1" forKey:@"auth_type"]; //默认不使用dns缓存,指定超时时间才会使用; if ([MRCocoaBindingUserDefault use_dns_cache]) { @@ -663,7 +665,7 @@ - (void)perpareIJKPlayer:(NSURL *)url hwaccel:(BOOL)hwaccel isLive:(BOOL)isLive [options setFormatOptionValue:@"Accept-Encoding: gzip, deflate" forKey:@"headers"]; } //protocol_whitelist need add httpproxy - //[options setFormatOptionValue:@"http://10.7.36.42:8888" forKey:@"http_proxy"]; + //[options setFormatOptionValue:@"http://10.7.36.40:8888" forKey:@"http_proxy"]; NSMutableArray *dus = [NSMutableArray array]; if ([url.scheme isEqualToString:@"file"] && [url.absoluteString.pathExtension isEqualToString:@"m3u8"]) {