diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-26 02:10:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-26 02:34:24 +0200 |
commit | c684cb29bc6e81b9b2973e826b6fec98f8bafe8c (patch) | |
tree | 9d639d03103bb07cb955becdd3713f8b300f6b8f /libavcodec/cllc.c | |
parent | 0c3a3b75d743602dfa207936862789e93327cfc7 (diff) | |
parent | db70730291df74595873d41914d2ef398fb13364 (diff) | |
download | ffmpeg-c684cb29bc6e81b9b2973e826b6fec98f8bafe8c.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
x86: fft: remove unused fft_dispatch* functions
avconv: remove unused variable opt_shortest
FATE: Add Canopus Lossless tests
cllc: Pad swapped buffer
Conflicts:
ffmpeg_opt.c
tests/ref/fate/cllc-argb
tests/ref/fate/cllc-rgb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cllc.c')
-rw-r--r-- | libavcodec/cllc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c index af51c36d8c..7625852aba 100644 --- a/libavcodec/cllc.c +++ b/libavcodec/cllc.c @@ -284,7 +284,8 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data, /* Make sure our bswap16'd buffer is big enough */ swapped_buf_new = av_fast_realloc(ctx->swapped_buf, - &ctx->swapped_buf_size, avpkt->size); + &ctx->swapped_buf_size, avpkt->size + + FF_INPUT_BUFFER_PADDING_SIZE); if (!swapped_buf_new) { av_log(avctx, AV_LOG_ERROR, "Could not realloc swapped buffer.\n"); return AVERROR(ENOMEM); @@ -313,6 +314,10 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data, ctx->dsp.bswap16_buf((uint16_t *) ctx->swapped_buf, (uint16_t *) src, (avpkt->size - info_offset) / 2); + /* Initialize padding to 0 */ + memset(ctx->swapped_buf + avpkt->size - info_offset, + 0, FF_INPUT_BUFFER_PADDING_SIZE); + init_get_bits(&gb, ctx->swapped_buf, (avpkt->size - info_offset) * 8); /* |