Diego Biurrun <[email protected]> writes:

> On Wed, Jul 13, 2011 at 12:54:46PM +0100, Mans Rullgard wrote:
>> These buffers have int16_t elements so the padding at the end needs
>> to be two bytes, not one.
>> 
>> --- a/libswscale/utils.c
>> +++ b/libswscale/utils.c
>> @@ -1045,19 +1045,19 @@ int sws_init_context(SwsContext *c, SwsFilter 
>> *srcFilter, SwsFilter *dstFilter)
>>      /* 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+2, 
>> fail);
>
> Could this be done with sizeof or similar instead of magic numbers?

I guess sizeof(c->lumPixBuf[0]) would work.  It's a bit of a mouthful though.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to