Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #272417

Category ffmpeg
Changed by marcos ashton <marcosashiglesiasohnoyoudont@gmail.com>
Changed at Wed 24 Jun 2026 01:42:38
Repository https://git.ffmpeg.org/ffmpeg.git
Project ffmpeg
Branch master
Revision 2985d4297883bf7599c0f96f103e7f5a924ce467

Comments

libavutil/pixdesc: fix prefix matching in *_from_name() functions
The seven *_from_name() functions in pixdesc.c (color_range,
color_primaries, color_transfer, color_space, chroma_location,
alpha_mode) used av_strstart() for prefix matching, which returns
incorrect results when one name is a prefix of another.

av_color_space_from_name("ycgco-re") matched "ycgco" at index
AVCOL_SPC_YCGCO and returned 8 instead of AVCOL_SPC_YCGCO_RE.
av_color_space_from_name("ycgco-ro") had the same issue. The
*_ext name lookups inside av_color_primaries_from_name and
av_color_transfer_from_name had the same flaw.

Switch all eight call sites from av_strstart() to strcmp() for
exact matching. No in-tree callers rely on prefix matching.

Signed-off-by: marcos ashton <marcosashiglesias@gmail.com>

Changed files