On Wed, Jul 13, 2011 at 11:37:16AM -0700, Ronald S. Bultje wrote: > Hi, > > On Wed, Jul 13, 2011 at 10:56 AM, Kostya <[email protected]> wrote: > > On Wed, Jul 13, 2011 at 10:43:35AM -0700, Ronald S. Bultje wrote: > >> From: "Ronald S. Bultje" <[email protected]> > >> > >> Fixes a crash when forcing libc to strictly adhere to malloc sizes. > >> --- > >> libswscale/utils.c | 12 ++++++------ > >> 1 files changed, 6 insertions(+), 6 deletions(-) > >> > >> diff --git a/libswscale/utils.c b/libswscale/utils.c > >> index 296c845..71f75d9 100644 > >> --- a/libswscale/utils.c > >> +++ b/libswscale/utils.c > >> @@ -1045,19 +1045,19 @@ int sws_init_context(SwsContext *c, SwsFilter > >> *srcFilter, SwsFilter *dstFilter) > >> //Note we need at least one pixel more at the end because of the MMX > >> code (just in case someone wanna replace the 4000/8000) > >> /* align at 16 bytes for AltiVec */ > >> for (i=0; i<c->vLumBufSize; i++) { > >> - FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf[i+c->vLumBufSize], > >> dst_stride+1, fail); > >> + FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf[i+c->vLumBufSize], > >> dst_stride+16, fail); > >> c->lumPixBuf[i] = c->lumPixBuf[i+c->vLumBufSize]; > >> } > >> - c->uv_off_px = dst_stride_px; > >> - c->uv_off_byte = dst_stride; > >> + c->uv_off_px = dst_stride_px + 64 / c->scalingBpp; > > > > This one looks a bit suspicious, why did you write it like this? > > The rest looks reasonable. > > I'm lazy. What it tries to do is 16 / sizeof(conversion_intermediate), > which is int16_t for scalingBpp==8 and int32_t for scalingBpp==16.
fine then _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
