aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-10-02 00:38:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-02 05:47:51 +0200
commitf421b534007ad791df593208d7998d07500a666e (patch)
tree47808eaff2f509cde9ed0f6f7c907aff10129955
parentd2a276a3fd7b34583ee7e8e7ec4c8fb85791c674 (diff)
downloadffmpeg-f421b534007ad791df593208d7998d07500a666e.tar.gz
Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffers used in 4xm decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 90a69b2f61cbd2d58723d712bdf283e5e56b2ea2)
-rw-r--r--libavcodec/4xm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 1ec64ae3e0..29cab37ada 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -399,6 +399,7 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
if (!f->bitstream_buffer)
return AVERROR(ENOMEM);
f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)(buf + extra), bitstream_size/4);
+ memset((uint8_t*)f->bitstream_buffer + bitstream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
init_get_bits(&f->gb, f->bitstream_buffer, 8*bitstream_size);
f->wordstream= (const uint16_t*)(buf + extra + bitstream_size);
@@ -680,6 +681,7 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
if (!f->bitstream_buffer)
return AVERROR(ENOMEM);
f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)prestream, prestream_size/4);
+ memset((uint8_t*)f->bitstream_buffer + prestream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
init_get_bits(&f->pre_gb, f->bitstream_buffer, 8*prestream_size);
f->last_dc= 0*128*8*8;