#include "avcodec.h"
#include "audio_frame_queue.h"
+#include "celp_filters.h"
#include "internal.h"
+#include "mathops.h"
#include "put_bits.h"
-#include "celp_filters.h"
#include "ra144.h"
RA144Context *ractx = avctx->priv_data;
ff_lpc_end(&ractx->lpc_ctx);
ff_af_queue_close(&ractx->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
return 0;
}
return -1;
}
avctx->frame_size = NBLOCKS * BLOCKSIZE;
- avctx->delay = avctx->frame_size;
+ avctx->initial_padding = avctx->frame_size;
avctx->bit_rate = 8000;
ractx = avctx->priv_data;
ractx->lpc_coef[0] = ractx->lpc_tables[0];
ff_af_queue_init(avctx, &ractx->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame) {
- ret = AVERROR(ENOMEM);
- goto error;
- }
-#endif
-
return 0;
error:
ra144_encode_close(avctx);
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;
AVCodec ff_ra_144_encoder = {
.name = "real_144",
+ .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_RA_144,
.priv_data_size = sizeof(RA144Context),
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_SMALL_LAST_FRAME,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
- .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
};