* Deinterleave input samples.
* Channels are reordered from libavcodec's default order to AAC order.
*/
-static void deinterleave_input_samples(AACEncContext *s, AVFrame *frame)
+static void deinterleave_input_samples(AACEncContext *s, const AVFrame *frame)
{
int ch, i;
const int sinc = s->channels;
}
start_ch += chans;
}
+ if ((ret = ff_alloc_packet2(avctx, avpkt, 768 * s->channels))) {
+ av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
+ return ret;
+ }
do {
int frame_bits;
- if ((ret = ff_alloc_packet2(avctx, avpkt, 768 * s->channels)))
- return ret;
init_put_bits(&s->pb, avpkt->data, avpkt->size);
if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & CODEC_FLAG_BITEXACT))
.encode2 = aac_encode_frame,
.close = aac_encode_end,
.supported_samplerates = avpriv_mpeg4audio_sample_rates,
- .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL,
- .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
- .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
- .priv_class = &aacenc_class,
+ .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY |
+ CODEC_CAP_EXPERIMENTAL,
+ .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
+ AV_SAMPLE_FMT_NONE },
+ .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
+ .priv_class = &aacenc_class,
};