summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-03-24 21:27:05 +0100
committerJustin Ruggles <justin.ruggles@gmail.com>2011-09-06 12:43:16 -0400
commit459fe331e9068dc916929021579c26021c097b57 (patch)
tree0f0c48c28c8bbbc1703d2b5bfa376282905c8d10 /libavcodec/ac3dec.c
parent6192b6f3e78b382ddf16b58fed2d3ab8745753f6 (diff)
ac3dec: avoid pointless alloc and indirection for input_buffer
Since we now always allocate it, it can simply be made part of the context instead.
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 663acc0ac9..9c0ed7dccb 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -38,9 +38,6 @@
#include "ac3dec_data.h"
#include "kbdwin.h"
-/** Large enough for maximum possible frame size when the specification limit is ignored */
-#define AC3_FRAME_BUFFER_SIZE 32768
-
/**
* table for ungrouping 3 values in 7 bits.
* used for exponents and bap=2 mantissas
@@ -206,11 +203,6 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
}
s->downmixed = 1;
- /* allocate context input buffer */
- s->input_buffer = av_mallocz(AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!s->input_buffer)
- return AVERROR(ENOMEM);
-
return 0;
}
@@ -1436,8 +1428,6 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx)
ff_mdct_end(&s->imdct_512);
ff_mdct_end(&s->imdct_256);
- av_freep(&s->input_buffer);
-
return 0;
}