diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2010-11-13 13:55:01 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2010-11-13 13:55:01 +0000 |
commit | 2722dd6ebf9d93ab097c303df1d789f6074121c8 (patch) | |
tree | e43c90a7cae8457f355aa91128cbff5772819998 /libavfilter/parseutils.h | |
parent | 521b8607488966a236cee5268a8797f3ed37e1ed (diff) |
improve av_parse_color() to allow for non-null terminated color string
Originally committed as revision 25744 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/parseutils.h')
-rw-r--r-- | libavfilter/parseutils.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/parseutils.h b/libavfilter/parseutils.h index a56750c02e..322afb3e76 100644 --- a/libavfilter/parseutils.h +++ b/libavfilter/parseutils.h @@ -40,9 +40,13 @@ * 0xff/1.0 completely opaque). * If the alpha component is not specified then 0xff is assumed. * The string "random" will result in a random color. + * @param slen length of the initial part of color_string containing the + * color. It can be set to -1 if color_string is a null terminated string + * containing nothing else than the color. * @return >= 0 in case of success, a negative value in case of * failure (for example if color_string cannot be parsed). */ -int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx); +int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, + void *log_ctx); #endif /* AVFILTER_PARSEUTILS_H */ |