summaryrefslogtreecommitdiff
path: root/libavcodec/libspeexenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libspeexenc.c')
-rw-r--r--libavcodec/libspeexenc.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 4277e62e4c..9469a76288 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -251,16 +251,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);
@@ -329,9 +319,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;