Fix compile error when config with -DENABLE_SRT=OFF (#4132)

This commit is contained in:
yanggs
2025-02-11 13:23:24 +08:00
committed by GitHub
parent a27e9459f5
commit 69e4c127bc
3 changed files with 14 additions and 4 deletions

View File

@@ -37,12 +37,14 @@ static bool checkMediaSourceAndUrlMatch(const MediaSource::Ptr &src, const std::
}
}
#ifdef ENABLE_SRT
if (strcasecmp("srt", prefix.data()) == 0) {
auto ts_src = std::dynamic_pointer_cast<TSMediaSource>(src);
if (!ts_src) {
return false;
}
}
#endif // ENABLE_SRT
return true;
}