aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-05 21:07:25 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-05 21:15:54 +0200
commit2c8ee2547ef10bc95a7fe5ceaef1c42802b1e2af (patch)
tree1873acfbf4b09a78ea37862086d53b147b3b8f47 /libavcodec/utils.c
parentc956cb2c02563ca87c7feec532c1c63a6385fccf (diff)
downloadffmpeg-2c8ee2547ef10bc95a7fe5ceaef1c42802b1e2af.tar.gz
avcodec: remove deprecated old audio decode API
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index cfc561346f..b6312b21dd 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2280,51 +2280,6 @@ fail:
return ret;
}
-#if FF_API_OLD_DECODE_AUDIO
-int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
- int *frame_size_ptr,
- AVPacket *avpkt)
-{
- AVFrame *frame = av_frame_alloc();
- int ret, got_frame = 0;
-
- if (!frame)
- return AVERROR(ENOMEM);
-
- ret = avcodec_decode_audio4(avctx, frame, &got_frame, avpkt);
-
- if (ret >= 0 && got_frame) {
- int ch, plane_size;
- int planar = av_sample_fmt_is_planar(avctx->sample_fmt);
- int data_size = av_samples_get_buffer_size(&plane_size, avctx->channels,
- frame->nb_samples,
- avctx->sample_fmt, 1);
- if (*frame_size_ptr < data_size) {
- av_log(avctx, AV_LOG_ERROR, "output buffer size is too small for "
- "the current frame (%d < %d)\n", *frame_size_ptr, data_size);
- av_frame_free(&frame);
- return AVERROR(EINVAL);
- }
-
- memcpy(samples, frame->extended_data[0], plane_size);
-
- if (planar && avctx->channels > 1) {
- uint8_t *out = ((uint8_t *)samples) + plane_size;
- for (ch = 1; ch < avctx->channels; ch++) {
- memcpy(out, frame->extended_data[ch], plane_size);
- out += plane_size;
- }
- }
- *frame_size_ptr = data_size;
- } else {
- *frame_size_ptr = 0;
- }
- av_frame_free(&frame);
- return ret;
-}
-
-#endif
-
int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
AVFrame *frame,
int *got_frame_ptr,