1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

HLS: Fix error when stream has extension. #4215 v5.0.217 v6.0.158 v7.0.19 (#4216)

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
Co-authored-by: winlin <winlinvip@gmail.com>
This commit is contained in:
Haibo Chen 2024-10-31 17:50:56 +08:00 committed by GitHub
parent 101382afd0
commit 58e775ce8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 3 deletions

View file

@ -630,6 +630,8 @@ srs_error_t SrsLiveStream::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage
// Correct the app and stream by path, which is created from template.
// @remark Be careful that the stream has extension now, might cause identify fail.
req->stream = srs_path_basename(r->path());
// remove the extension of stream if have. for instance, test.flv -> test
req->stream = srs_path_filename(req->stream);
// update client ip
req->ip = hc->remote_ip();