mirror of https://github.com/mpv-player/mpv
af_scaletempo: Fix crash in option parsing
The value of the "speed" suboption was not initialized before calling subopt_parse(). If the command line had suboptions but "speed" was not one of them then the code accessed an uninitialized pointer and possibly crashed. Fixed by initializing the option value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24926 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ff1568af58
commit
e803711bbd
|
@ -434,7 +434,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
|
|||
*(float*)arg = s->scale;
|
||||
return AF_OK;
|
||||
case AF_CONTROL_COMMAND_LINE:{
|
||||
strarg_t speed;
|
||||
strarg_t speed = {};
|
||||
opt_t subopts[] = {
|
||||
{"scale", OPT_ARG_FLOAT, &s->scale_nominal, NULL},
|
||||
{"stride", OPT_ARG_FLOAT, &s->ms_stride, NULL},
|
||||
|
|
Loading…
Reference in New Issue