diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-10-24 01:22:49 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-11-05 18:57:36 +0100 |
commit | 07efb63931bb3522d298d2387ffbd17253ce20b3 (patch) | |
tree | ec8c8c33920452d5b473a6b6aebb0da53cd8fc91 | |
parent | 468feb863ba0e96533b3c1df997bb02614ed8d1d (diff) | |
download | mpv-07efb63931bb3522d298d2387ffbd17253ce20b3.tar.bz2 mpv-07efb63931bb3522d298d2387ffbd17253ce20b3.tar.xz |
player/command: use pl_hdr_metadata_contains
-rw-r--r-- | player/command.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/player/command.c b/player/command.c index 9fef3088e3..56b65794d8 100644 --- a/player/command.c +++ b/player/command.c @@ -2710,11 +2710,9 @@ static int mp_property_hdr_metadata(void *ctx, struct m_property *prop, if (vo_control(mpctx->video_out, VOCTRL_HDR_METADATA, &data) != VO_TRUE) return M_PROPERTY_UNAVAILABLE; - bool has_hdr10 = data.max_luma; - bool has_hdr10plus = data.scene_avg && (data.scene_max[0] || - data.scene_max[1] || - data.scene_max[2]); - bool has_cie_y = data.max_pq_y && data.avg_pq_y; + bool has_cie_y = pl_hdr_metadata_contains(&data, PL_HDR_METADATA_CIE_Y); + bool has_hdr10 = pl_hdr_metadata_contains(&data, PL_HDR_METADATA_HDR10); + bool has_hdr10plus = pl_hdr_metadata_contains(&data, PL_HDR_METADATA_HDR10PLUS); struct m_sub_property props[] = { {"min-luma", SUB_PROP_FLOAT(data.min_luma), .unavailable = !has_hdr10}, |