Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-26 04:10:25 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-08-26 04:34:24 +0400
commitc684cb29bc6e81b9b2973e826b6fec98f8bafe8c (patch)
tree9d639d03103bb07cb955becdd3713f8b300f6b8f /libavcodec/cllc.c
parent0c3a3b75d743602dfa207936862789e93327cfc7 (diff)
parentdb70730291df74595873d41914d2ef398fb13364 (diff)
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.c7
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);
/*