summaryrefslogtreecommitdiff
path: root/libavcodec/dca_xll.c
diff options
context:
space:
mode:
authorfoo86 <foobaz86@gmail.com>2016-05-13 12:48:30 +0300
committerJames Almer <jamrial@gmail.com>2016-05-31 11:45:48 -0300
commitd1f558b3628d3ab99fd93a98b5758ef1be45a5da (patch)
tree56a4b6407998349ca54d12da5ff32dfcc9c37f0f /libavcodec/dca_xll.c
parentd3463912c196a9814a0144ce7db7e38c11948c7d (diff)
avcodec/dca: require checked bitstream reader
Remove half-working attempt at supporting unchecked bitstream reader by always copying input data into intermediate buffer with large amount of padding at the end. Convert LBR decoder to checked bitstream reader. Convert dcadec_decode_frame() to parse input data directly if possible. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dca_xll.c')
-rw-r--r--libavcodec/dca_xll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index e43ee6aab8..1d616c298c 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -1070,7 +1070,7 @@ static int copy_to_pbr(DCAXllDecoder *s, uint8_t *data, int size, int delay)
if (size > DCA_XLL_PBR_BUFFER_MAX)
return AVERROR(ENOSPC);
- if (!s->pbr_buffer && !(s->pbr_buffer = av_malloc(DCA_XLL_PBR_BUFFER_MAX + DCA_BUFFER_PADDING_SIZE)))
+ if (!s->pbr_buffer && !(s->pbr_buffer = av_malloc(DCA_XLL_PBR_BUFFER_MAX + AV_INPUT_BUFFER_PADDING_SIZE)))
return AVERROR(ENOMEM);
memcpy(s->pbr_buffer, data, size);