Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-21 18:02:35 +0300
committerJames Almer <jamrial@gmail.com>2017-03-21 18:02:52 +0300
commit2a8a8a2e98136c22f6e07ff669251afb8a033676 (patch)
treedda0512341b3664284e42b133b646dffbf0df65c /libswresample
parent6d11b2f6567619cfa40b7e3809572818c7fc41b9 (diff)
swresample/resample: move resample_free() higher in the file
Also make it more readable while at it. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/resample.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c
index 144b232462..7b433d0110 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -276,6 +276,14 @@ fail:
return ret;
}
+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, double kaiser_beta,
double precision, int cheby, int exact_rational)
@@ -371,13 +379,6 @@ error:
return NULL;
}
-static void resample_free(ResampleContext **c){
- if(!*c)
- return;
- av_freep(&(*c)->filter_bank);
- av_freep(c);
-}
-
static int rebuild_filter_bank_with_compensation(ResampleContext *c)
{
uint8_t *new_filter_bank;