diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-17 16:56:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-17 19:00:11 +0200 |
commit | a5dc990a4eec13320e97f287640138e549d99d88 (patch) | |
tree | 467946564051c0a4f369bc3d63bc63c45ed8267b /libavcodec/rv34.c | |
parent | 4907f813581acd6cf68f1be9eb163464503e8208 (diff) | |
download | ffmpeg-a5dc990a4eec13320e97f287640138e549d99d88.tar.gz |
Fix buffer size used for MC of B frames after a resolution change in the real decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 6d4e6e35f9..62425a06fe 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1303,15 +1303,15 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int r->cbp_luma = av_realloc(r->cbp_luma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_luma)); r->cbp_chroma = av_realloc(r->cbp_chroma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_chroma)); r->deblock_coefs = av_realloc(r->deblock_coefs, r->s.mb_stride * r->s.mb_height * sizeof(*r->deblock_coefs)); + av_freep(&r->tmp_b_block_base); } s->pict_type = r->si.type ? r->si.type : AV_PICTURE_TYPE_I; if(MPV_frame_start(s, s->avctx) < 0) return -1; ff_er_frame_start(s); - if (!r->tmp_b_block_base || s->width != r->si.width || s->height != r->si.height) { + if (!r->tmp_b_block_base) { int i; - 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; |