From: Andre Noll Date: Sat, 17 Oct 2009 15:50:19 +0000 (+0200) Subject: trivial whitespace cleanups X-Git-Tag: v0.4.1~86 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=5747192b26d313449964a735226136c12dc1c77e;ds=sidebyside trivial whitespace cleanups --- diff --git a/wmadec_filter.c b/wmadec_filter.c index 5151622e..0565a14b 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -123,13 +123,13 @@ struct private_wmadec_data { }; #define EXPVLCBITS 8 -#define EXPMAX ((19+EXPVLCBITS-1)/EXPVLCBITS) +#define EXPMAX ((19 + EXPVLCBITS - 1) / EXPVLCBITS) #define HGAINVLCBITS 9 -#define HGAINMAX ((13+HGAINVLCBITS-1)/HGAINVLCBITS) +#define HGAINMAX ((13 + HGAINVLCBITS - 1) / HGAINVLCBITS) #define VLCBITS 9 -#define VLCMAX ((22+VLCBITS-1)/VLCBITS) +#define VLCMAX ((22 + VLCBITS - 1)/VLCBITS) DECLARE_ALIGNED(16, float, ff_sine_128[128]); DECLARE_ALIGNED(16, float, ff_sine_256[256]); @@ -752,9 +752,8 @@ static int wma_decode_block(struct private_wmadec_data *s) if ((s->block_pos + s->block_len) > s->frame_len) return -E_INCOHERENT_BLOCK_LEN; - if (s->ahi.channels == 2) { + if (s->ahi.channels == 2) s->ms_stereo = get_bits1(&s->gb); - } v = 0; for (ch = 0; ch < s->ahi.channels; ch++) { int a = get_bits1(&s->gb); @@ -1130,7 +1129,7 @@ static inline int16_t av_clip_int16(int a) } /* Decode a frame of frame_len samples. */ -static int wma_decode_frame(struct private_wmadec_data *s, int16_t * samples) +static int wma_decode_frame(struct private_wmadec_data *s, int16_t *samples) { int ret, i, n, ch, incr; int16_t *ptr; @@ -1205,9 +1204,8 @@ static int wma_decode_superframe(struct private_wmadec_data *s, void *data, *q++ = get_bits(&s->gb, 8); len -= 8; } - if (len > 0) { + if (len > 0) *q++ = get_bits(&s->gb, len) << (8 - len); - } /* XXX: bit_offset bits into last frame */ init_get_bits(&s->gb, s->last_superframe, @@ -1250,9 +1248,8 @@ static int wma_decode_superframe(struct private_wmadec_data *s, void *data, pos >>= 3; len = buf_size - pos; ret = -E_WMA_BAD_SUPERFRAME; - if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0) { + if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0) goto fail; - } s->last_superframe_len = len; memcpy(s->last_superframe, buf + pos, len); } else { @@ -1311,6 +1308,7 @@ static ssize_t wmadec_convert(char *inbuffer, size_t len, static void wmadec_close(struct filter_node *fn) { struct private_wmadec_data *pwd = fn->private_data; + if (!pwd) return; wmadec_cleanup(pwd);