avctx->sample_rate = 8000 * is_amr_wb;
if (avctx->channels > 1) {
- av_log_missing_feature(avctx, "multi-channel AMR", 0);
+ avpriv_report_missing_feature(avctx, "multi-channel AMR");
return AVERROR_PATCHWELCOME;
}
avctx->frame_size = 160;
avctx->delay = 50;
ff_af_queue_init(avctx, &s->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
-#endif
s->enc_state = Encoder_Interface_init(s->enc_dtx);
if (!s->enc_state) {
Encoder_Interface_exit(s->enc_state);
ff_af_queue_close(&s->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
return 0;
}
/* get output buffer */
frame->nb_samples = 320;
- if ((ret = ff_get_buffer(avctx, frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}