History

swresample/resample: move resample_free() higher in the file

Also make it more readable while at it.

James Almer committed 9 years ago

Commit 2a8a8a21 parent 6d11b2f1 file · +8 −7Browse files

Unified · Split

libswresample/resample.c+8−7
@@ -276,6 +276,14 @@ fail: · 275 unmodified lines
276276 return ret;
277277 }
278278
279+static void resample_free(ResampleContext **cc){
280+ ResampleContext *c = *cc;
281+ if(!c)
282+ return;
283+ av_freep(&c->filter_bank);
284+ av_freep(cc);
285+}
286+
279287 static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
280288 double cutoff0, enum AVSampleFormat format, enum SwrFilterType filter_type, double kaiser_beta,
281289 double precision, int cheby, int exact_rational)
@@ -371,13 +379,6 @@ error: · 89 unmodified lines
371379 return NULL;
372380 }
373381
374−static void resample_free(ResampleContext **c){
375− if(!*c)
376− return;
377− av_freep(&(*c)->filter_bank);
378− av_freep(c);
379−}
380−
381382 static int rebuild_filter_bank_with_compensation(ResampleContext *c)
382383 {
383384 uint8_t *new_filter_bank;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t