From 89a1d3858c9e4ee9c5fd20f147bad77678f36251 Mon Sep 17 00:00:00 2001 From: Jaume Puig Date: Thu, 22 Oct 2026 16:32:40 +0200 Subject: [PATCH] Fix the colourspace property with FFmpeg 7.1. FFmpeg 7.1 added AVCOL_SPC_IPT_C2, AVCOL_SPC_YCGCO_RE and AVCOL_SPC_YCGCO_RO (AVCOL_SPC_NB = 18) but still has libpostproc, so it is built without DCPOMATIC_FFMPEG_8 and the assertion that AVCOL_SPC_NB is 15 fails when the properties of an FFmpeg content are listed. Always list the three names and check AVCOL_SPC_NB <= 18, as is done for the primaries and transfer characteristics. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp --- src/lib/ffmpeg_content.cc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 3ab9bfb0c4..73a996d25d 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -655,21 +655,14 @@ FFmpegContent::add_properties(shared_ptr film, list& p _("SMPTE 2085, Y'D'zD'x"), _("Chroma-derived non-constant luminance"), _("Chroma-derived constant luminance"), -#ifdef DCPOMATIC_FFMPEG_8 - _("BT2100"), - _("SMPTE ST 2128, IPT-C2"), - _("YCgCo-R, even addition"), - _("YCgCo-R, odd addition") -#else - _("BT2100") -#endif + _("BT2100"), + /* These three are in FFmpeg 7.1 and later */ + _("SMPTE ST 2128, IPT-C2"), + _("YCgCo-R, even addition"), + _("YCgCo-R, odd addition") }; -#ifdef DCPOMATIC_FFMPEG_8 - DCPOMATIC_ASSERT(AVCOL_SPC_NB == 18); -#else - DCPOMATIC_ASSERT(AVCOL_SPC_NB == 15); -#endif + DCPOMATIC_ASSERT(AVCOL_SPC_NB <= 18); p.push_back(UserProperty(UserProperty::VIDEO, _("Colourspace"), spaces[_colorspace.get_value_or(AVCOL_SPC_UNSPECIFIED)]));