From a92be9b856bd11b081041c43c25d442028fe9a63 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 6 Jun 2011 14:13:02 +0200 Subject: Replace memset(0) by zero initializations. Also remove one pointless zero initialization in rangecoder.c. --- libavcodec/wmaprodec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libavcodec/wmaprodec.c') diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 65ca3c8e58..ce87aeffc2 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -521,7 +521,7 @@ static int decode_subframe_length(WMAProDecodeCtx *s, int offset) */ static int decode_tilehdr(WMAProDecodeCtx *s) { - uint16_t num_samples[WMAPRO_MAX_CHANNELS]; /**< sum of samples for all currently known subframes of a channel */ + uint16_t num_samples[WMAPRO_MAX_CHANNELS] = { 0 };/**< sum of samples for all currently known subframes of a channel */ uint8_t contains_subframe[WMAPRO_MAX_CHANNELS]; /**< flag indicating if a channel contains the current subframe */ int channels_for_cur_subframe = s->num_channels; /**< number of channels that contain the current subframe */ int fixed_channel_layout = 0; /**< flag indicating that all channels use the same subframe offsets and sizes */ @@ -538,8 +538,6 @@ static int decode_tilehdr(WMAProDecodeCtx *s) for (c = 0; c < s->num_channels; c++) s->channel[c].num_subframes = 0; - memset(num_samples, 0, sizeof(num_samples)); - if (s->max_num_subframes == 1 || get_bits1(&s->gb)) fixed_channel_layout = 1; -- cgit v1.2.3