+2017-09-20 13:32 GMT+02:00 Vittorio Giovara <vittorio.giovara at gmail.com <http://ffmpeg.org/mailman/listinfo/ffmpeg-devel>>: + +>* +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
It's to be consistent with the other APIs that map a string to an enum, like in spherical.c and stereo3d.c. -- Vittorio _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel