Repository navigation
Conversation
Some servers answer HEAD with 403 while serving GET normally (e.g. the Rai 3 DASH manifest on cdn.netrw.it). The HEAD-based FileExists() check then fails, the stream type stays unknown and the URL is handed to the FFmpeg demuxer instead of inputstream.adaptive, so playback fails. For HTTP URLs, rely on the GET used to sniff the content instead.
GetChannelStreamProperties() looks up the stream type through the catchup controller, which caches it, and then SetAllStreamProperties() inspected the same URL again. For URLs without a recognisable extension (redirectors, token services) this meant an extra HTTP request on every channel switch, adding 1-2 s before playback could start. Pass the type the catchup controller found for the same URL and only inspect when it is unknown.
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.
Fixes two problems in the stream type detection:
InspectStreamType()first checksFileExists(), which uses HEAD, so the type stays unknown and the stream is handed to the ffmpeg demuxer ("error probing input format") instead of inputstream.adaptive. HTTP URLs now skip the HEAD; the GET that sniffs the content already detects unreachable streams.SetAllStreamProperties()inspected the URL again although the catchup controller had just looked up, and cached, its type for the same URL. That type is now reused, saving a request (1-2 s) per switch.Tested on Kodi master on macOS: Rai 3 plays through inputstream.adaptive; repeat switches to relinker channels no longer request the URL before playback.