input: fix playlist track data overriding issue in CUE file
Fixes #4143 (closed)
In a vlc_meta_t
object, each metadata key is associated with a priority: VLC_META_PRIORITY_BASIC, VLC_META_PRIORITY_PLAYLIST, or VLC_META_PRIORITY_INBAND. During metadata merging, keys with higher or equal priority can override those with lower priority. When parsing playlist metadata from a CUE file, keys are now assigned a priority of VLC_META_PRIORITY_PLAYLIST. This change prevents subsequent audio files, which have VLC_META_PRIORITY_BASIC, from overriding the playlist metadata. Additionally, this commit ensures that the duration of individual tracks is calculated using the 'start-time' and 'stop-time' options. This prevents the total track duration from overriding the individual track durations in the playlist.
Sample CUE file: soft-rock-CD.cue
Merge request reports
Activity
Thanks
Thanks for your contribution!
When all of the following conditions are fulfilled, your MergeRequest will be reviewed by the Team:
- the check pipeline passes
- the MR is considered as 'mergeable' by gitlab
You can find more details about the acceptance process here.
added MRStatus::Reviewable label
- Resolved by Thomas Guillem
Is this the simplest? Does it work in libVLC case too, or just with the main playlist?
- Resolved by Thomas Guillem
Also, we have the same issue with m3u.
added MRStatus::InReview label and removed MRStatus::Reviewable label
changed milestone to %4.0
added Component::Core: Input label
- Resolved by Steve Lhomme
- Resolved by Steve Lhomme
- Resolved by Steve Lhomme
- Resolved by Steve Lhomme
- Resolved by Steve Lhomme
- Resolved by Thomas Guillem
- Resolved by Thomas Guillem
- Resolved by Thomas Guillem
I don't think that this is going to fly in the sense that I don't think it can handle lesd trivial cases than CUE files.
It's not a simple matter of mutable vs immutable. For instance meta-data extracted from media headers should probably have lower precedence than playlist's meta-data, but in-band meta-data hzs higher precedence. And yet both types of meta come from the demuxer.
added 164 commits
-
ae6f6de7...48193d1d - 156 commits from branch
videolan:master
- b391edfb - input: add priority based metadata merging
- 972b8439 - input: add functions to set metadata with priority
- dceef6d4 - lua: add trusted metadata property
- a9dac8a4 - lua: set metadata priority based on `trusted` property
- c0b172cb - input: split StartTitle function into StartTitle and SetStopStart
- 64f01a7d - input: call SetStopStart() for all input threads
- ef9eaae4 - input: add input_thread_SetItemDuration function
- b48fbc68 - input: replace input_item_SetDuration calls with input_thread_SetItemDuration
Toggle commit list-
ae6f6de7...48193d1d - 156 commits from branch
added MRStatus::NotCompliant label and removed MRStatus::InReview label
added MRStatus::InReview label and removed MRStatus::NotCompliant label