New parameters to "config" property to override streams media flags#2040
Conversation
|
Decision: APPROVE Issues: none Evidence:
Review Details
|
|
@kodiai please review |
📝 Kodiai Draft Review SummaryWhat ChangedAdds new configuration parameters to Strengths
ObservationsImpact[MAJOR] src/common/AdaptationSet.cpp (262): Array out-of-bounds access when representations vector is empty Verdict🔴 Address before merging -- 1 blocking issue(s) found (MAJOR) |
8b61d6c to
405a987
Compare
|
@kodiai updated please review |
kodiai responseI don't have access to the PR diff or changes through the available tools. Could you point me to the specific files that were updated in this revision? |
|
@kodiai updated please review |
There was a problem hiding this comment.
Decision: APPROVE
kodiai response
Decision: APPROVE
Issues: none
Evidence:
- Bounds checking properly implemented:
AdaptationSet.cpp:261,282now verify!GetRepresentations().empty()before accessing[0] - Iterator validation correct throughout
AdaptiveTree.cpp:167-273: all accesses check!= adpSets.cend()before dereferencing - Previous array out-of-bounds issue resolved
|
@matthuisman if iirc you was using |
405a987 to
dd7ea35
Compare
dd7ea35 to
b2955bc
Compare
Description
New parameters to
inputstream.adaptive.config:media_audio_langcode_default: Set the "default" flag to the audio streams with specified language codemedia_audio_langcode_original: Set the "original" flag to the audio streams with specified language codemedia_audio_stereo_pref: Can be set totruewhen you want prefer stereo track as default instead of multi-channels (it will be applied tomedia_audio_langcode_defaultandmedia_audio_langcode_original)media_audio_type_pref: Can be set tooriginalto prefer set as default the stream with original language, orimpairedto prefer set as default the stream for impaired, otherwise left empty value for default behaviour.media_subtitle_langcode_default: Set the "default" flag to the subtitle streams with specified language codeabout the language code format used should be the IETF RFC 5646 (BCP-47), but i suggest you to check also your manifest data
The property
inputstream.adaptive.original_audio_languageis now deprecated and will be removed from next kodi (major) versionNOTE FOR LANG CODE VARIANTS: At moment Kodi dont support any kind of track auto-selection fallback for language code that have variants e.g. "pt-BR" for Brazilian Portuguese vs "pt" for Portuguese, so here at moment its the same, if you set as default "pt-BR" but exists only a "pt" stream no stream will be set as default. This could be improved in future but for now we keep it simple.
Motivation and context
Completed fix for #422 in more generic way
this will allow to override streams media flags in a generic way without being strictly limited to a single manifest type
the reason behind this is that Kodi stream media flags have not always have the same meaning of manifests attributes
and/or there are video services that dont follow exactly the specs and lead to wrong flags set to the audio/subtitle tracks
this will make the life easier for devs without the needs to implement a proxy on each addon to modify on the fly the manifest media flags
HLS manifest side effect
The HLS manifests dont always provide the appropriate language codes and also dont always provide the right number of audio channels in the manifest, therefore the use of these new overrides may fails, you will need to check what your provider offers and act accordingly
How has this been tested?
Screenshots (if appropriate):
Types of change
Checklist: