diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 02:57:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 02:57:39 +0100 |
commit | ace91616558f189fbe84ac7f9b66167a999fcc61 (patch) | |
tree | e22bf4e2104b0f24090bd71809cccf15af6b96e8 /libavutil/opt.c | |
parent | eb74839caa2c50018b1d5a88a43c3da9f4345a8d (diff) | |
download | ffmpeg-ace91616558f189fbe84ac7f9b66167a999fcc61.tar.gz |
avutil/opt: Check av_parse_video_rate()s return value
Fixes CID1257008
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index e43b5d8363..4cf20693ff 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1811,8 +1811,10 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o) return (w == *(int *)dst) && (h == *((int *)dst+1)); case AV_OPT_TYPE_VIDEO_RATE: q = (AVRational){0, 0}; - if (o->default_val.str) - av_parse_video_rate(&q, o->default_val.str); + if (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); case AV_OPT_TYPE_COLOR: { uint8_t color[4] = {0, 0, 0, 0}; |