|
|
|
@@ -171,6 +171,14 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
static void resample_free(ResampleContext **cc){ |
|
|
|
ResampleContext *c = *cc; |
|
|
|
if(!c) |
|
|
|
return; |
|
|
|
av_freep(&c->filter_bank); |
|
|
|
av_freep(cc); |
|
|
|
} |
|
|
|
|
|
|
|
static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear, |
|
|
|
double cutoff0, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta, |
|
|
|
double precision, int cheby) |
|
|
|
@@ -251,13 +259,6 @@ error: |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
|
|
|
|
static void resample_free(ResampleContext **c){ |
|
|
|
if(!*c) |
|
|
|
return; |
|
|
|
av_freep(&(*c)->filter_bank); |
|
|
|
av_freep(c); |
|
|
|
} |
|
|
|
|
|
|
|
static int set_compensation(ResampleContext *c, int sample_delta, int compensation_distance){ |
|
|
|
c->compensation_distance= compensation_distance; |
|
|
|
if (compensation_distance) |
|
|
|
|