aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-06-06 14:13:02 +0200
committerDiego Biurrun <diego@biurrun.de>2012-03-28 09:38:33 +0200
commita92be9b856bd11b081041c43c25d442028fe9a63 (patch)
tree32f852fdf904a30238c789e57510be710eaa7826 /libavcodec/alsdec.c
parent856c8e0a049dc7069b7504d3aaa48549c75852de (diff)
downloadffmpeg-a92be9b856bd11b081041c43c25d442028fe9a63.tar.gz
Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 1b916e4ff2..35952ae21f 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1026,9 +1026,7 @@ static int decode_blocks_ind(ALSDecContext *ctx, unsigned int ra_frame,
unsigned int *js_blocks)
{
unsigned int b;
- ALSBlockData bd;
-
- memset(&bd, 0, sizeof(ALSBlockData));
+ ALSBlockData bd = { 0 };
bd.ra_block = ra_frame;
bd.const_block = ctx->const_block;
@@ -1069,9 +1067,7 @@ static int decode_blocks(ALSDecContext *ctx, unsigned int ra_frame,
ALSSpecificConfig *sconf = &ctx->sconf;
unsigned int offset = 0;
unsigned int b;
- ALSBlockData bd[2];
-
- memset(bd, 0, 2 * sizeof(ALSBlockData));
+ ALSBlockData bd[2] = { { 0 } };
bd[0].ra_block = ra_frame;
bd[0].const_block = ctx->const_block;
@@ -1337,7 +1333,7 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
sizeof(*ctx->raw_samples[c]) * sconf->max_order);
}
} else { // multi-channel coding
- ALSBlockData bd;
+ ALSBlockData bd = { 0 };
int b;
int *reverted_channels = ctx->reverted_channels;
unsigned int offset = 0;
@@ -1348,7 +1344,6 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
return -1;
}
- memset(&bd, 0, sizeof(ALSBlockData));
memset(reverted_channels, 0, sizeof(*reverted_channels) * avctx->channels);
bd.ra_block = ra_frame;