Commit ace91616 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/opt: Check av_parse_video_rate()s return value

Fixes CID1257008
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eb74839c
...@@ -1811,8 +1811,10 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o) ...@@ -1811,8 +1811,10 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o)
return (w == *(int *)dst) && (h == *((int *)dst+1)); return (w == *(int *)dst) && (h == *((int *)dst+1));
case AV_OPT_TYPE_VIDEO_RATE: case AV_OPT_TYPE_VIDEO_RATE:
q = (AVRational){0, 0}; q = (AVRational){0, 0};
if (o->default_val.str) if (o->default_val.str) {
av_parse_video_rate(&q, o->default_val.str); if ((ret = av_parse_video_rate(&q, o->default_val.str)) < 0)
return ret;
}
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};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment