aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rv34.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2011-08-12 21:50:28 +0200
committerRonald S. Bultje <rsbultje@gmail.com>2011-08-12 13:49:25 -0700
commit78622ef362c7c8d4606fe1a38f612f039413c7c3 (patch)
tree9a71c5ffbcc3a39c9b3b3173ab8fb5b7746ee9cb /libavcodec/rv34.c
parent28ca701e0b57dfaf03ab1835ce62faa1de8c4712 (diff)
downloadffmpeg-78622ef362c7c8d4606fe1a38f612f039413c7c3.tar.gz
rv34: free+allocate buffer instead of reallocating it to preserve alignment
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r--libavcodec/rv34.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index cdc559fa07..253c3952d2 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -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) {
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++)
r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize;
for (i = 0; i < 4; i++)