mirror of https://github.com/mpv-player/mpv
Initialize cutoff, too. Fixes crash when AF_CONTROL_COMMAND_LINE is not set.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14187 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a6a1a0c9aa
commit
9a6c650981
|
@ -144,16 +144,18 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int open(af_instance_t* af){
|
static int open(af_instance_t* af){
|
||||||
|
af_resample_t *s = calloc(1,sizeof(af_resample_t));
|
||||||
af->control=control;
|
af->control=control;
|
||||||
af->uninit=uninit;
|
af->uninit=uninit;
|
||||||
af->play=play;
|
af->play=play;
|
||||||
af->mul.n=1;
|
af->mul.n=1;
|
||||||
af->mul.d=1;
|
af->mul.d=1;
|
||||||
af->data=calloc(1,sizeof(af_data_t));
|
af->data=calloc(1,sizeof(af_data_t));
|
||||||
af->setup=calloc(1,sizeof(af_resample_t));
|
s->filter_length= 16;
|
||||||
((af_resample_t*)af->setup)->filter_length= 16;
|
s->cutoff= max(1.0 - 1.0/s->filter_length, 0.80);
|
||||||
((af_resample_t*)af->setup)->phase_shift= 10;
|
s->phase_shift= 10;
|
||||||
// ((af_resample_t*)af->setup)->setup = RSMP_INT | FREQ_SLOPPY;
|
// s->setup = RSMP_INT | FREQ_SLOPPY;
|
||||||
|
af->setup=s;
|
||||||
return AF_OK;
|
return AF_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue