aboutsummaryrefslogtreecommitdiff
path: root/video_player/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-06-08 02:13:00 +0200
committerdec05eba <dec05eba@protonmail.com>2025-06-08 02:13:00 +0200
commitc71a676edf4ccc583652e1f31c571f3cd898d60e (patch)
tree18c43cd7fa018e9426d14dde3fa18530ca3c6e14 /video_player/src/main.cpp
parent91db117734301a24e47ea784a677ec1b3df44465 (diff)
Fix youtube for schizo proxy users
Diffstat (limited to 'video_player/src/main.cpp')
-rw-r--r--video_player/src/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/video_player/src/main.cpp b/video_player/src/main.cpp
index 54b5bb4..e2a8629 100644
--- a/video_player/src/main.cpp
+++ b/video_player/src/main.cpp
@@ -473,8 +473,14 @@ static int64_t size_fn(void *cookie) {
if(res == 0) {
size_t header_start = str_find_case_insensitive(buffer, 0, "200 OK", 6);
if(header_start == std::string::npos) {
- res = MPV_ERROR_UNSUPPORTED;
- goto end;
+ header_start = str_find_case_insensitive(buffer, 0, "HTTP/3 200", 10);
+ if(header_start == std::string::npos)
+ header_start = str_find_case_insensitive(buffer, 0, "HTTP/2 200", 10);
+
+ if(header_start == std::string::npos) {
+ res = MPV_ERROR_UNSUPPORTED;
+ goto end;
+ }
}
header_start += 6;