mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 13:05:09 +00:00
fix(tracks): match probed hdr10p tracks on remote and hint dv+hdr10p on -r HDR10P
match_track treats HDR10 and HDR10P as equal in its attribute fallback. -r HDR10P warns that a DV track carries HDR10+ when one does.
This commit is contained in:
@@ -176,6 +176,14 @@ def test_match_track_by_attributes_keeps_range_and_bitrate_apart() -> None:
|
||||
assert match_track(remote, [sdr, hdr]) is hdr
|
||||
|
||||
|
||||
def test_match_track_by_attributes_matches_probed_hdr10p_to_local_hdr10() -> None:
|
||||
common = {"codec": "HEVC", "width": 3840, "height": 2160, "language": "en", "bitrate": 15000000}
|
||||
sdr = deserialize_video({**common, "id": "a", "range": "SDR"})
|
||||
hdr10 = deserialize_video({**common, "id": "b", "range": "HDR10"})
|
||||
remote = deserialize_video({**common, "id": "z", "range": "HDR10P"})
|
||||
assert match_track(remote, [sdr, hdr10]) is hdr10
|
||||
|
||||
|
||||
def test_match_track_no_candidates_returns_none() -> None:
|
||||
remote = deserialize_video({"id": "X", "codec": "AVC", "width": 1, "height": 1})
|
||||
assert match_track(remote, []) is None
|
||||
|
||||
Reference in New Issue
Block a user