stream_curl: set stream url to the effective one in case of a redirect#18044
Open
MoSal wants to merge 1 commit into
Open
stream_curl: set stream url to the effective one in case of a redirect#18044MoSal wants to merge 1 commit into
MoSal wants to merge 1 commit into
Conversation
Without this, there are two issues I've quickly encountered:
1. (major) HLS segment URLs are broken, because segment lines get
appended to the original URL. Not only does this break playback,
but it could leak query data (like auth tokens) to a third party.
2. (medium) HLS master playlists are opened as actual playlists, with
an entry per variant stream.
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
kasper93
reviewed
May 30, 2026
| if (effective_url && strcmp(s->url, effective_url)) { | ||
| MP_INFO(p, "Redirected:\n"); | ||
| MP_INFO(p, " (original) %s\n", s->url); | ||
| MP_INFO(p, " (redirect) %s\n", effective_url); |
Member
There was a problem hiding this comment.
This should be a single log and probably MP_VERBOSE at best.
kasper93
reviewed
May 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without this, there are two issues I've quickly encountered:
First issue basically broke playback in almost all IPTV use-cases 🫢
To test this. Here is a trivial python script:
Details
To trigger the issues:
First Issue
Works
Broken
Segment URL's constructed are of the template:
Second issue
Opens as a stream
Opens as a playlist