From f60abbe18364a4368fd756f48c79af67d377fca7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 6 Feb 2016 07:19:53 +0100 Subject: [PATCH] wmadec: Make pwd->reset_block_lengths a boolean. This field is already used as such. Improve the documentation while at it. --- wmadec_filter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wmadec_filter.c b/wmadec_filter.c index c1f0c302..6348adda 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -88,8 +88,8 @@ struct private_wmadec_data { int frame_len_bits; /** Number of block sizes, one if !ahi->use_variable_block_len. */ int nb_block_sizes; - /* block info */ - int reset_block_lengths; + /* Whether to update block lengths from getbit context. */ + bool reset_block_lengths; /** log2 of current block length. */ int block_len_bits; /** log2 of next block length. */ @@ -391,7 +391,7 @@ static int wma_init(struct private_wmadec_data *pwd) pwd->windows[i] = sine_windows[pwd->frame_len_bits - i - 7]; } - pwd->reset_block_lengths = 1; + pwd->reset_block_lengths = true; if (pwd->use_noise_coding) { /* init the noise generator */ @@ -834,7 +834,7 @@ static int wma_decode_block(struct private_wmadec_data *pwd) n = wma_log2(pwd->nb_block_sizes - 1) + 1; if (pwd->reset_block_lengths) { - pwd->reset_block_lengths = 0; + pwd->reset_block_lengths = false; v = get_bits(&pwd->gb, n); if (v >= pwd->nb_block_sizes) return -E_WMA_BLOCK_SIZE; @@ -1129,7 +1129,7 @@ static int wma_decode_superframe(struct private_wmadec_data *pwd, void *data, if (len > 0) skip_bits(&pwd->gb, len); - pwd->reset_block_lengths = 1; + pwd->reset_block_lengths = true; for (i = 0; i < nb_frames; i++) { ret = wma_decode_frame(pwd, samples); if (ret < 0) -- 2.39.5