aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/aacenc.c8
-rw-r--r--libavcodec/ac3enc.c11
-rw-r--r--libavcodec/adpcmenc.c8
-rw-r--r--libavcodec/adxenc.c16
-rw-r--r--libavcodec/avcodec.h5
-rw-r--r--libavcodec/flacenc.c9
-rw-r--r--libavcodec/g722enc.c11
-rw-r--r--libavcodec/g726.c18
-rw-r--r--libavcodec/libfaac.c11
-rw-r--r--libavcodec/libfdk-aacenc.c10
-rw-r--r--libavcodec/libgsm.c9
-rw-r--r--libavcodec/libilbc.c14
-rw-r--r--libavcodec/libmp3lame.c11
-rw-r--r--libavcodec/libopencore-amr.c8
-rw-r--r--libavcodec/libspeexenc.c13
-rw-r--r--libavcodec/libvo-aacenc.c8
-rw-r--r--libavcodec/libvo-amrwbenc.c6
-rw-r--r--libavcodec/libvorbisenc.c11
-rw-r--r--libavcodec/mpegaudioenc.c15
-rw-r--r--libavcodec/nellymoserenc.c11
-rw-r--r--libavcodec/ra144enc.c11
-rw-r--r--libavcodec/roqaudioenc.c11
-rw-r--r--libavcodec/version.h4
-rw-r--r--libavcodec/vorbisenc.c11
-rw-r--r--libavcodec/wma.c5
-rw-r--r--libavcodec/wmaenc.c5
26 files changed, 2 insertions, 258 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 420d0ced26..997442efe5 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -679,9 +679,6 @@ static av_cold int aac_encode_end(AVCodecContext *avctx)
av_freep(&s->buffer.samples);
av_freep(&s->cpe);
ff_af_queue_close(&s->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
return 0;
}
@@ -715,11 +712,6 @@ static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
for(ch = 0; ch < s->channels; ch++)
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
-#if FF_API_OLD_ENCODE_AUDIO
- if (!(avctx->coded_frame = avcodec_alloc_frame()))
- goto alloc_fail;
-#endif
-
return 0;
alloc_fail:
return AVERROR(ENOMEM);
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 16f0cdc4de..15ff34326c 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2049,9 +2049,6 @@ av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
s->mdct_end(s);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
return 0;
}
@@ -2481,14 +2478,6 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
if (ret)
goto init_fail;
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame= avcodec_alloc_frame();
- if (!avctx->coded_frame) {
- ret = AVERROR(ENOMEM);
- goto init_fail;
- }
-#endif
-
ff_dsputil_init(&s->dsp, avctx);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 59f016bdb1..762cf673a1 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -144,11 +144,6 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
goto error;
}
-#if FF_API_OLD_ENCODE_AUDIO
- if (!(avctx->coded_frame = avcodec_alloc_frame()))
- goto error;
-#endif
-
return 0;
error:
adpcm_encode_close(avctx);
@@ -158,9 +153,6 @@ error:
static av_cold int adpcm_encode_close(AVCodecContext *avctx)
{
ADPCMEncodeContext *s = avctx->priv_data;
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&s->paths);
av_freep(&s->node_buf);
av_freep(&s->nodep_buf);
diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c
index fb8e06deb3..df07c81189 100644
--- a/libavcodec/adxenc.c
+++ b/libavcodec/adxenc.c
@@ -107,14 +107,6 @@ static int adx_encode_header(AVCodecContext *avctx, uint8_t *buf, int bufsize)
return HEADER_SIZE;
}
-#if FF_API_OLD_ENCODE_AUDIO
-static av_cold int adx_encode_close(AVCodecContext *avctx)
-{
- av_freep(&avctx->coded_frame);
- return 0;
-}
-#endif
-
static av_cold int adx_encode_init(AVCodecContext *avctx)
{
ADXContext *c = avctx->priv_data;
@@ -125,11 +117,6 @@ static av_cold int adx_encode_init(AVCodecContext *avctx)
}
avctx->frame_size = BLOCK_SAMPLES;
-#if FF_API_OLD_ENCODE_AUDIO
- if (!(avctx->coded_frame = avcodec_alloc_frame()))
- return AVERROR(ENOMEM);
-#endif
-
/* the cutoff can be adjusted, but this seems to work pretty well */
c->cutoff = 500;
ff_adx_calculate_coeffs(c->cutoff, avctx->sample_rate, COEFF_BITS, c->coeff);
@@ -175,9 +162,6 @@ AVCodec ff_adpcm_adx_encoder = {
.id = AV_CODEC_ID_ADPCM_ADX,
.priv_data_size = sizeof(ADXContext),
.init = adx_encode_init,
-#if FF_API_OLD_ENCODE_AUDIO
- .close = adx_encode_close,
-#endif
.encode2 = adx_encode_frame,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index cc9adf753b..4fbef41d5f 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -547,11 +547,6 @@ typedef struct AVCodecDescriptor {
*/
#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
-#if FF_API_OLD_DECODE_AUDIO
-/* in bytes */
-#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
-#endif
-
/**
* @ingroup lavc_decoding
* Required number of additionally allocated bytes at the end of the input bitstream for decoding.
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 354a0f7686..dc932c6e68 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -399,12 +399,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
s->frame_count = 0;
s->min_framesize = s->max_framesize;
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
-#endif
-
if (channels == 3 &&
avctx->channel_layout != (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER) ||
channels == 4 &&
@@ -1310,9 +1304,6 @@ static av_cold int flac_encode_close(AVCodecContext *avctx)
}
av_freep(&avctx->extradata);
avctx->extradata_size = 0;
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
return 0;
}
diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c
index 3c470540f8..b276b4e643 100644
--- a/libavcodec/g722enc.c
+++ b/libavcodec/g722enc.c
@@ -53,9 +53,6 @@ static av_cold int g722_encode_close(AVCodecContext *avctx)
av_freep(&c->node_buf[i]);
av_freep(&c->nodep_buf[i]);
}
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
return 0;
}
@@ -123,14 +120,6 @@ static av_cold int g722_encode_init(AVCodecContext * avctx)
}
}
-#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:
g722_encode_close(avctx);
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 38f91a0af0..8e630ffd05 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -331,13 +331,6 @@ static av_cold int g726_encode_init(AVCodecContext *avctx)
g726_reset(c);
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
- avctx->coded_frame->key_frame = 1;
-#endif
-
/* select a frame size that will end on a byte boundary and have a size of
approximately 1024 bytes */
avctx->frame_size = ((int[]){ 4096, 2736, 2048, 1640 })[c->code_size - 2];
@@ -345,14 +338,6 @@ static av_cold int g726_encode_init(AVCodecContext *avctx)
return 0;
}
-#if FF_API_OLD_ENCODE_AUDIO
-static av_cold int g726_encode_close(AVCodecContext *avctx)
-{
- av_freep(&avctx->coded_frame);
- return 0;
-}
-#endif
-
static int g726_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
@@ -402,9 +387,6 @@ AVCodec ff_adpcm_g726_encoder = {
.priv_data_size = sizeof(G726Context),
.init = g726_encode_init,
.encode2 = g726_encode_frame,
-#if FF_API_OLD_ENCODE_AUDIO
- .close = g726_encode_close,
-#endif
.capabilities = CODEC_CAP_SMALL_LAST_FRAME,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index 43de22a80b..ac18fe209f 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -45,9 +45,6 @@ static av_cold int Faac_encode_close(AVCodecContext *avctx)
{
FaacAudioContext *s = avctx->priv_data;
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&avctx->extradata);
ff_af_queue_close(&s->afq);
@@ -132,14 +129,6 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
avctx->frame_size = samples_input / avctx->channels;
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame= avcodec_alloc_frame();
- if (!avctx->coded_frame) {
- ret = AVERROR(ENOMEM);
- goto error;
- }
-#endif
-
/* Set decoder specific info */
avctx->extradata_size = 0;
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index e4710f6c56..e3992e1dbe 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -97,9 +97,6 @@ static int aac_encode_close(AVCodecContext *avctx)
if (s->handle)
aacEncClose(&s->handle);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&avctx->extradata);
ff_af_queue_close(&s->afq);
@@ -275,13 +272,6 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
goto error;
}
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame) {
- ret = AVERROR(ENOMEM);
- goto error;
- }
-#endif
avctx->frame_size = info.frameLength;
avctx->delay = info.encoderDelay;
ff_af_queue_init(avctx, &s->afq);
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 66fe0ae1b1..16fbb0ebda 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -41,9 +41,6 @@
#include "gsm.h"
static av_cold int libgsm_encode_close(AVCodecContext *avctx) {
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
gsm_destroy(avctx->priv_data);
avctx->priv_data = NULL;
return 0;
@@ -88,12 +85,6 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
}
}
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame= avcodec_alloc_frame();
- if (!avctx->coded_frame)
- goto error;
-#endif
-
return 0;
error:
libgsm_encode_close(avctx);
diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index dd44bebc3e..15433ed79e 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -159,23 +159,10 @@ static av_cold int ilbc_encode_init(AVCodecContext *avctx)
avctx->block_align = s->encoder.no_of_bytes;
avctx->frame_size = s->encoder.blockl;
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
-#endif
return 0;
}
-static av_cold int ilbc_encode_close(AVCodecContext *avctx)
-{
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
- return 0;
-}
-
static int ilbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
@@ -204,7 +191,6 @@ AVCodec ff_libilbc_encoder = {
.priv_data_size = sizeof(ILBCEncContext),
.init = ilbc_encode_init,
.encode2 = ilbc_encode_frame,
- .close = ilbc_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"),
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 19f88abf7f..94e358217f 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -78,9 +78,6 @@ static av_cold int mp3lame_encode_close(AVCodecContext *avctx)
{
LAMEContext *s = avctx->priv_data;
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&s->samples_flt[0]);
av_freep(&s->samples_flt[1]);
av_freep(&s->buffer);
@@ -143,14 +140,6 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
avctx->frame_size = lame_get_framesize(s->gfp);
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame) {
- ret = AVERROR(ENOMEM);
- goto error;
- }
-#endif
-
/* allocate float sample buffers */
if (avctx->sample_fmt == AV_SAMPLE_FMT_FLTP) {
int ch;
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 5b8e8e6641..2935932c9a 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -203,11 +203,6 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
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) {
@@ -228,9 +223,6 @@ static av_cold int amr_nb_encode_close(AVCodecContext *avctx)
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;
}
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 051dce6dd0..b96ca1ba55 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -252,16 +252,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "memory allocation error\n");
return AVERROR(ENOMEM);
}
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame) {
- av_freep(&avctx->extradata);
- speex_header_free(header_data);
- speex_encoder_destroy(s->enc_state);
- av_log(avctx, AV_LOG_ERROR, "memory allocation error\n");
- return AVERROR(ENOMEM);
- }
-#endif
/* copy header packet to extradata */
memcpy(avctx->extradata, header_data, header_size);
@@ -328,9 +318,6 @@ static av_cold int encode_close(AVCodecContext *avctx)
speex_encoder_destroy(s->enc_state);
ff_af_queue_close(&s->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&avctx->extradata);
return 0;
diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index 10f292b784..4f4cbe7a67 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -47,9 +47,6 @@ static int aac_encode_close(AVCodecContext *avctx)
AACContext *s = avctx->priv_data;
s->codec_api.Uninit(s->handle);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&avctx->extradata);
ff_af_queue_close(&s->afq);
av_freep(&s->end_buffer);
@@ -63,11 +60,6 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
AACENC_PARAM params = { 0 };
int index, ret;
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
-#endif
avctx->frame_size = FRAME_SIZE;
avctx->delay = ENC_DELAY;
s->last_frame = 2;
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index 4294374482..a068cd009d 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -94,11 +94,6 @@ static av_cold int amr_wb_encode_init(AVCodecContext *avctx)
avctx->frame_size = 320;
avctx->delay = 80;
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame = avcodec_alloc_frame();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
-#endif
s->state = E_IF_init();
@@ -110,7 +105,6 @@ static int amr_wb_encode_close(AVCodecContext *avctx)
AMRWBContext *s = avctx->priv_data;
E_IF_exit(s->state);
- av_freep(&avctx->coded_frame);
return 0;
}
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index 1c0dab65e9..d3f86ccc59 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -187,9 +187,6 @@ static av_cold int oggvorbis_encode_close(AVCodecContext *avctx)
av_fifo_free(s->pkt_fifo);
ff_af_queue_close(&s->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&avctx->extradata);
return 0;
@@ -267,14 +264,6 @@ static av_cold int oggvorbis_encode_init(AVCodecContext *avctx)
goto error;
}
-#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:
oggvorbis_encode_close(avctx);
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index 36345137f2..3a109f09dc 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -184,12 +184,6 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
total_quant_bits[i] = 12 * v;
}
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame= avcodec_alloc_frame();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
-#endif
-
return 0;
}
@@ -769,14 +763,6 @@ static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
return 0;
}
-static av_cold int MPA_encode_close(AVCodecContext *avctx)
-{
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
- return 0;
-}
-
static const AVCodecDefault mp2_defaults[] = {
{ "b", "128k" },
{ NULL },
@@ -789,7 +775,6 @@ AVCodec ff_mp2_encoder = {
.priv_data_size = sizeof(MpegAudioContext),
.init = MPA_encode_init,
.encode2 = MPA_encode_frame,
- .close = MPA_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.supported_samplerates = (const int[]){
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index a8c96faea7..b35820a3f8 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -140,9 +140,6 @@ static av_cold int encode_end(AVCodecContext *avctx)
av_free(s->path);
}
ff_af_queue_close(&s->afq);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
return 0;
}
@@ -187,14 +184,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
}
-#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:
encode_end(avctx);
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index 21d38dcea0..2eac343165 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -40,9 +40,6 @@ static av_cold int ra144_encode_close(AVCodecContext *avctx)
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;
}
@@ -71,14 +68,6 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx)
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);
diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c
index ba020d03e5..b68e3f8cb0 100644
--- a/libavcodec/roqaudioenc.c
+++ b/libavcodec/roqaudioenc.c
@@ -46,9 +46,6 @@ static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx)
{
ROQDPCMContext *context = avctx->priv_data;
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&context->frame_buffer);
return 0;
@@ -81,14 +78,6 @@ static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
context->lastSample[0] = context->lastSample[1] = 0;
-#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:
roq_dpcm_encode_close(avctx);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3e01b47dc8..4c58dd1ab0 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -58,14 +58,14 @@
#define FF_API_AVCODEC_OPEN (LIBAVCODEC_VERSION_MAJOR < 55)
#endif
#ifndef FF_API_OLD_DECODE_AUDIO
-#define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 55)
+#define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_OLD_TIMECODE
#define FF_API_OLD_TIMECODE (LIBAVCODEC_VERSION_MAJOR < 55)
#endif
#ifndef FF_API_OLD_ENCODE_AUDIO
-#define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 55)
+#define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_OLD_ENCODE_VIDEO
#define FF_API_OLD_ENCODE_VIDEO (LIBAVCODEC_VERSION_MAJOR < 56)
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index b8752d6bea..d685996277 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -1153,9 +1153,6 @@ static av_cold int vorbis_encode_close(AVCodecContext *avctx)
ff_mdct_end(&venc->mdct[0]);
ff_mdct_end(&venc->mdct[1]);
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&avctx->extradata);
return 0 ;
@@ -1187,14 +1184,6 @@ static av_cold int vorbis_encode_init(AVCodecContext *avctx)
avctx->frame_size = 1 << (venc->log2_blocksize[0] - 1);
-#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:
vorbis_encode_close(avctx);
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index e704223f1e..1e6ca61047 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -390,11 +390,6 @@ int ff_wma_end(AVCodecContext *avctx)
av_free(s->int_table[i]);
}
-#if FF_API_OLD_ENCODE_AUDIO
- if (av_codec_is_encoder(avctx->codec))
- av_freep(&avctx->coded_frame);
-#endif
-
return 0;
}
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index e15109519b..799535ea70 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -50,11 +50,6 @@ static int encode_init(AVCodecContext * avctx){
return AVERROR(EINVAL);
}
-#if FF_API_OLD_ENCODE_AUDIO
- if (!(avctx->coded_frame = avcodec_alloc_frame()))
- return AVERROR(ENOMEM);
-#endif
-
/* extract flag infos */
flags1 = 0;
flags2 = 1;