aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/smacker.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/smacker.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/smacker.c')
-rw-r--r--libavcodec/smacker.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 05f4a925fb..d4253873c5 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -180,7 +180,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
int res;
HuffContext huff;
HuffContext tmp1, tmp2;
- VLC vlc[2];
+ VLC vlc[2] = { { 0 } };
int escapes[3];
DBCtx ctx;
int err = 0;
@@ -204,9 +204,6 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
tmp2.lengths = av_mallocz(256 * sizeof(int));
tmp2.values = av_mallocz(256 * sizeof(int));
- memset(&vlc[0], 0, sizeof(VLC));
- memset(&vlc[1], 0, sizeof(VLC));
-
if(get_bits1(gb)) {
smacker_decode_tree(gb, &tmp1, 0, 0);
skip_bits1(gb);
@@ -591,8 +588,8 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
GetBitContext gb;
- HuffContext h[4];
- VLC vlc[4];
+ HuffContext h[4] = { { 0 } };
+ VLC vlc[4] = { { 0 } };
int16_t *samples;
uint8_t *samples8;
int val;
@@ -635,8 +632,6 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
samples = (int16_t *)s->frame.data[0];
samples8 = s->frame.data[0];
- memset(vlc, 0, sizeof(VLC) * 4);
- memset(h, 0, sizeof(HuffContext) * 4);
// Initialize
for(i = 0; i < (1 << (bits + stereo)); i++) {
h[i].length = 256;