mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-02 03:06:28 +02:00
Rename ColorEntry.rgba_color to rgb_color and do not reserve a fourth
byte for the alpha component, as it is never used, clarify the code and prevent bad usage of it. Originally committed as revision 23834 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7447204d2d
commit
8e094dd667
@ -65,7 +65,7 @@ char *av_get_token(const char **buf, const char *term)
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name; ///< a string representing the name of the color
|
const char *name; ///< a string representing the name of the color
|
||||||
uint8_t rgba_color[4]; ///< RGBA values for the color
|
uint8_t rgb_color[3]; ///< RGB values for the color
|
||||||
} ColorEntry;
|
} ColorEntry;
|
||||||
|
|
||||||
static ColorEntry color_table[] = {
|
static ColorEntry color_table[] = {
|
||||||
@ -251,7 +251,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx)
|
|||||||
av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string);
|
av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string);
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
memcpy(rgba_color, entry->rgba_color, 4);
|
memcpy(rgba_color, entry->rgb_color, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user