X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fra144enc.c;h=b9473ac197603839f8646fd2f4da7eee7085a6c8;hb=04f4dbc2fa7c17c915300cade64947531124100e;hp=bbea9d7f2a3dc41646451700ba930aef5b5f413d;hpb=330d9d1b50d59e0faabaedfe9fbf1f066e5744c9;p=ffmpeg diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c index bbea9d7f2a3..b9473ac1976 100644 --- a/libavcodec/ra144enc.c +++ b/libavcodec/ra144enc.c @@ -342,7 +342,7 @@ static void ra144_encode_subblock(RA144Context *ractx, const int16_t *lpc_coefs, unsigned int rms, PutBitContext *pb) { - float data[BLOCKSIZE], work[LPC_ORDER + BLOCKSIZE]; + float data[BLOCKSIZE] = { 0 }, work[LPC_ORDER + BLOCKSIZE]; float coefs[LPC_ORDER]; float zero[BLOCKSIZE], cba[BLOCKSIZE], cb1[BLOCKSIZE], cb2[BLOCKSIZE]; int16_t cba_vect[BLOCKSIZE]; @@ -360,7 +360,6 @@ static void ra144_encode_subblock(RA144Context *ractx, * Calculate the zero-input response of the LPC filter and subtract it from * input data. */ - memset(data, 0, sizeof(data)); ff_celp_lp_synthesis_filterf(work + LPC_ORDER, coefs, data, BLOCKSIZE, LPC_ORDER); for (i = 0; i < BLOCKSIZE; i++) { @@ -538,7 +537,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, for (; i < frame->nb_samples; i++) ractx->curr_block[i] = samples[i] >> 2; - if ((ret = ff_af_queue_add(&ractx->afq, frame) < 0)) + if ((ret = ff_af_queue_add(&ractx->afq, frame)) < 0) return ret; } else ractx->last_frame = 1; @@ -558,7 +557,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_ra_144_encoder = { .name = "real_144", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_RA_144, + .id = AV_CODEC_ID_RA_144, .priv_data_size = sizeof(RA144Context), .init = ra144_encode_init, .encode2 = ra144_encode_frame,