Commit d70231f0 authored by Boris Maksalov's avatar Boris Maksalov Committed by Michael Niedermayer

Fix reading past the end of frame buffer.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bd922050
......@@ -254,24 +254,24 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src,
ctx->dsp.fdct(esrc, elinesize, blocks);
blocks += 64;
if (blocks_per_mb > 2) {
ctx->dsp.fdct(src + 8, linesize, blocks);
ctx->dsp.fdct(esrc + 8, elinesize, blocks);
blocks += 64;
}
ctx->dsp.fdct(src + linesize * 4, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4, elinesize, blocks);
blocks += 64;
if (blocks_per_mb > 2) {
ctx->dsp.fdct(src + linesize * 4 + 8, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4 + 8, elinesize, blocks);
blocks += 64;
}
} else {
ctx->dsp.fdct(esrc, elinesize, blocks);
blocks += 64;
ctx->dsp.fdct(src + linesize * 4, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4, elinesize, blocks);
blocks += 64;
if (blocks_per_mb > 2) {
ctx->dsp.fdct(src + 8, linesize, blocks);
ctx->dsp.fdct(esrc + 8, elinesize, blocks);
blocks += 64;
ctx->dsp.fdct(src + linesize * 4 + 8, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4 + 8, elinesize, blocks);
blocks += 64;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment