avutil/opt: ensure the right buffer is used in set_string_number()

Fixes use of uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-07-25 21:29:43 +02:00
parent aadf5222da
commit 24327706e1

View File

@ -206,7 +206,7 @@ static int set_string_number(void *obj, void *target_obj, const AVOption *o, con
}
{
const AVOption *o_named = av_opt_find(target_obj, buf, o->unit, 0, 0);
const AVOption *o_named = av_opt_find(target_obj, i ? buf : val, o->unit, 0, 0);
int res;
int ci = 0;
double const_values[64];