http-flv直播后缀由.flv改成.live.flv(目的是防止与flv文件下载冲突)

This commit is contained in:
ziyue 2022-02-09 11:48:15 +08:00
parent 756ec1364b
commit cd1ca2c18c

View File

@ -330,10 +330,10 @@ bool HttpSession::checkLiveStreamTS(const function<void()> &cb){
}); });
} }
//http-flv 链接格式:http://vhost-url:port/app/streamid.flv?key1=value1&key2=value2 //http-flv 链接格式:http://vhost-url:port/app/streamid.live.flv?key1=value1&key2=value2
bool HttpSession::checkLiveStreamFlv(const function<void()> &cb){ bool HttpSession::checkLiveStreamFlv(const function<void()> &cb){
auto start_pts = atoll(_parser.getUrlArgs()["starPts"].data()); auto start_pts = atoll(_parser.getUrlArgs()["starPts"].data());
return checkLiveStream(RTMP_SCHEMA, ".flv", [this, cb, start_pts](const MediaSource::Ptr &src) { return checkLiveStream(RTMP_SCHEMA, ".live.flv", [this, cb, start_pts](const MediaSource::Ptr &src) {
auto rtmp_src = dynamic_pointer_cast<RtmpMediaSource>(src); auto rtmp_src = dynamic_pointer_cast<RtmpMediaSource>(src);
assert(rtmp_src); assert(rtmp_src);
if (!cb) { if (!cb) {