[FFmpeg-devel] [PATCH] pixdesc: Add API to map color property name to enum value
Carl Eugen Hoyos
ceffmpeg at gmail.com
Wed Sep 20 14:50:38 EEST 2017
2017-09-20 13:32 GMT+02:00 Vittorio Giovara <vittorio.giovara at gmail.com>:
> +int av_color_range_from_name(const char *name)
> +{
> + int i;
> +
> + for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) {
> + size_t len = strlen(color_range_names[i]);
> + if (!strncmp(color_range_names[i], name, len))
> + return i;
> + }
> +
> + return -1;
Is there a reason why the functions do not return an error code?
Carl Eugen
More information about the ffmpeg-devel
mailing list