aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-01 00:58:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-01 01:32:23 +0200
commite62ca1ab74a959584db80f42b49f708257abbdcb (patch)
tree38259705d30b7383542892fab853d19bd4ecec8e
parentceede3a802478b6cf0c1cd7d54b76b4af8d00d56 (diff)
downloadffmpeg-e62ca1ab74a959584db80f42b49f708257abbdcb.tar.gz
mpegvideo: increase emu edge buffer size
This fixes a crash with 422 H.264 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 7322483d72d4abefae9f5c08c611f521de7236a5)
-rw-r--r--libavcodec/mpegvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index d819cc083f..a505b9071c 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -366,8 +366,8 @@ static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base){
int i;
// edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264)
- FF_ALLOCZ_OR_GOTO(s->avctx, s->allocated_edge_emu_buffer, (s->width+64)*2*21*2, fail); //(width + edge + align)*interlaced*MBsize*tolerance
- s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*21;
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->allocated_edge_emu_buffer, (s->width+64)*2*21*2*2, fail); //(width + edge + align)*interlaced*MBsize*tolerance
+ s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*21*2;
//FIXME should be linesize instead of s->width*2 but that is not known before get_buffer()
FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t), fail)