[FFmpeg-cvslog] swresample: fix another broken indent chunk.

Clément Bœsch git at videolan.org
Mon Oct 10 15:56:01 CEST 2011


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Mon Oct 10 15:54:09 2011 +0200| [ade3ec8457f76a127e8f495ee73a2dee6cb80002] | committer: Clément Bœsch

swresample: fix another broken indent chunk.

Also use a consistent style inside that block.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ade3ec8457f76a127e8f495ee73a2dee6cb80002
---

 libswresample/resample2.c |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/libswresample/resample2.c b/libswresample/resample2.c
index 73f536f..6510111 100644
--- a/libswresample/resample2.c
+++ b/libswresample/resample2.c
@@ -203,25 +203,24 @@ AVResampleContext *swr_resample_init(AVResampleContext *c, int out_rate, int in_
     double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
     int phase_count= 1<<phase_shift;
 
-    if(!c || c->phase_shift!=phase_shift || c->linear!=linear || c->factor != factor
-         || c->filter_length!=FFMAX((int)ceil(filter_size/factor), 1)){
-    c= av_mallocz(sizeof(AVResampleContext));
-    if (!c)
-        return NULL;
-
-    c->phase_shift= phase_shift;
-    c->phase_mask= phase_count-1;
-    c->linear= linear;
-    c->factor= factor;
-
-    c->filter_length= FFMAX((int)ceil(filter_size/factor), 1);
-    c->filter_bank= av_mallocz(c->filter_length*(phase_count+1)*sizeof(FELEM));
-    if (!c->filter_bank)
-        goto error;
-    if (build_filter(c->filter_bank, factor, c->filter_length, phase_count, 1<<FILTER_SHIFT, WINDOW_TYPE))
-        goto error;
-    memcpy(&c->filter_bank[c->filter_length*phase_count+1], c->filter_bank, (c->filter_length-1)*sizeof(FELEM));
-    c->filter_bank[c->filter_length*phase_count]= c->filter_bank[c->filter_length - 1];
+    if (!c || c->phase_shift != phase_shift || c->linear!=linear || c->factor != factor
+           || c->filter_length != FFMAX((int)ceil(filter_size/factor), 1)) {
+        c = av_mallocz(sizeof(AVResampleContext));
+        if (!c)
+            return NULL;
+
+        c->phase_shift   = phase_shift;
+        c->phase_mask    = phase_count - 1;
+        c->linear        = linear;
+        c->factor        = factor;
+        c->filter_length = FFMAX((int)ceil(filter_size/factor), 1);
+        c->filter_bank   = av_mallocz(c->filter_length*(phase_count+1)*sizeof(FELEM));
+        if (!c->filter_bank)
+            goto error;
+        if (build_filter(c->filter_bank, factor, c->filter_length, phase_count, 1<<FILTER_SHIFT, WINDOW_TYPE))
+            goto error;
+        memcpy(&c->filter_bank[c->filter_length*phase_count+1], c->filter_bank, (c->filter_length-1)*sizeof(FELEM));
+        c->filter_bank[c->filter_length*phase_count]= c->filter_bank[c->filter_length - 1];
     }
 
     c->compensation_distance= 0;



More information about the ffmpeg-cvslog mailing list