On Wed, 27 Sep 2023 12:20:37 +0200 Andreas Rheinhardt <andreas.rheinha...@outlook.com> wrote: > Why is this a separate function and not just a new parameter to > ff_icc_profile_read_primaries() given that these seem to always be used > a pair?
Because it mutates the profile. It seems strange to me for a function named `ff_icc_profile_*read*_primaries` to modify the profile it's reading from. If it were possible to easily add this sanitization logic without touching the profile itself I would have merged the two. Forcing it to be a separate function forces each caller to think about whether they want to actually modify the profile or not. At present we only have two callers, and both of them destroy the cmsHPROFILE after calling this function, so mutating is fine. But is that a given? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".