Browse Source

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>
tags/n3.3
James Almer 9 years ago
parent
commit
2a8a8a2e98
1 changed files with 8 additions and 7 deletions
  1. +8
    -7
      libswresample/resample.c

+ 8
- 7
libswresample/resample.c View File

@@ -276,6 +276,14 @@ fail:
return ret; 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, 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 cutoff0, enum AVSampleFormat format, enum SwrFilterType filter_type, double kaiser_beta,
double precision, int cheby, int exact_rational) double precision, int cheby, int exact_rational)
@@ -371,13 +379,6 @@ error:
return NULL; 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) static int rebuild_filter_bank_with_compensation(ResampleContext *c)
{ {
uint8_t *new_filter_bank; uint8_t *new_filter_bank;


Loading…
Cancel
Save