Using the old code, half of it was unused and the other half was too
small for e.g. >8bpp interlaced data, causing random buffer overruns.
---
libavcodec/mpegvideo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index baab3c8..9bcd5c3 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -378,7 +378,7 @@ static int init_duplicate_context(MpegEncContext *s,
MpegEncContext *base){
// 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;
+ s->edge_emu_buffer= s->allocated_edge_emu_buffer;
//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)
--
1.7.2.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel