]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ra144enc.c
mpegaudiodec: fix short_start calculation
[ffmpeg] / libavcodec / ra144enc.c
index bbea9d7f2a3dc41646451700ba930aef5b5f413d..5b5de76434f24d9cb0934901f94370a12a44bb42 100644 (file)
@@ -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++) {
@@ -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,