mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-19 09:02:26 +02:00
avutil/opt: Check av_parse_color() return value
Fixes: CID1257007 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3393cd8545
commit
eb74839caa
@ -1816,8 +1816,10 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o)
|
|||||||
return !av_cmp_q(*(AVRational*)dst, q);
|
return !av_cmp_q(*(AVRational*)dst, q);
|
||||||
case AV_OPT_TYPE_COLOR: {
|
case AV_OPT_TYPE_COLOR: {
|
||||||
uint8_t color[4] = {0, 0, 0, 0};
|
uint8_t color[4] = {0, 0, 0, 0};
|
||||||
if (o->default_val.str)
|
if (o->default_val.str) {
|
||||||
av_parse_color(color, o->default_val.str, -1, NULL);
|
if ((ret = av_parse_color(color, o->default_val.str, -1, NULL)) < 0)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
return !memcmp(color, dst, sizeof(color));
|
return !memcmp(color, dst, sizeof(color));
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user