aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Youtube.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 2d92cd8..b3150a3 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -2517,6 +2517,15 @@ R"END(
if(!format.isObject())
continue;
+ if(is_adaptive) {
+ // TODO: Fix. Some streams use &sq=num instead of index
+ const Json::Value &index_range_json = format["indexRange"];
+ if(index_range_json.isNull()) {
+ fprintf(stderr, "Ignoring adaptive stream without indexRange\n");
+ continue;
+ }
+ }
+
// TODO: Support HDR?
const Json::Value &quality_label_json = format["qualityLabel"];
if(quality_label_json.isString() && strstr(quality_label_json.asCString(), "HDR")) continue;