Skip to content
Snippets Groups Projects

input: fix playlist track data overriding issue in CUE file

Merged Ayush Dey requested to merge deyayush6/vlc:cue-playlist-fix into master

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

Screenshot: cue-ss

Edited by Ayush Dey

Merge request reports

Merge request pipeline #501906 passed

Merge request pipeline passed for bf5b6d59

Test coverage 18.44% from 1 job
Approved by

Merged by Steve LhommeSteve Lhomme 8 months ago (Aug 12, 2024 5:39am UTC)

Merge details

  • Changes merged into master with bf5b6d59.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #501909 passed

Pipeline passed for bf5b6d59 on master

Test coverage 18.44% from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Steve Lhomme
  • Steve Lhomme
  • Steve Lhomme
  • Steve Lhomme
  • 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.

  • Ayush Dey added 164 commits

    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

    Compare with previous version

  • Ayush Dey changed the description

    changed the description

  • added MRStatus::NotCompliant label and removed MRStatus::InReview label

  • Ayush Dey added 2 commits

    added 2 commits

    • fd54f8cb - input: add input_thread_SetItemDuration function
    • 669d50b3 - input: replace input_item_SetDuration calls with input_thread_SetItemDuration

    Compare with previous version

  • added MRStatus::InReview label and removed MRStatus::NotCompliant label

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading