1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

rv34: free+allocate buffer instead of reallocating it to preserve alignment

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Kostya Shishkov
2011-08-12 21:50:28 +02:00
committed by Ronald S. Bultje
parent 28ca701e0b
commit 78622ef362

View File

@@ -1311,7 +1311,8 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int
if (!r->tmp_b_block_base || s->width != r->si.width || s->height != r->si.height) { if (!r->tmp_b_block_base || s->width != r->si.width || s->height != r->si.height) {
int i; int i;
r->tmp_b_block_base = av_realloc(r->tmp_b_block_base, s->linesize * 48); av_free(r->tmp_b_block_base); //realloc() doesn't guarantee alignment
r->tmp_b_block_base = av_malloc(s->linesize * 48);
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize; r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)