Hi, 2011/10/4 Måns Rullgård <[email protected]>: > "Ronald S. Bultje" <[email protected]> writes: > >> 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; > > With this change, is there still a need for the separate variables?
Good point, removed in the attached. Ronald
0001-mpegvideo-set-correct-offset-for-edge-emulation-buff.patch
Description: Binary data
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
