[FFmpeg-cvslog] r9848 - trunk/libavcodec/ac3dec.c

Benjamin Larsson banan
Thu Aug 2 09:44:15 CEST 2007


Justin Ruggles skrev:
> Benjamin Larsson wrote:
>> jbr wrote:
>>> Author: jbr
>>> Date: Wed Aug  1 03:13:58 2007
>>> New Revision: 9848
>>>
>>> Log:
>>> align array used in mdct. fixes segfault.
>>>
>>> Modified:
>>>    trunk/libavcodec/ac3dec.c
>>>
>>> Modified: trunk/libavcodec/ac3dec.c
>>> ============================================================================== 
>>>
>>> --- trunk/libavcodec/ac3dec.c    (original)
>>> +++ trunk/libavcodec/ac3dec.c    Wed Aug  1 03:13:58 2007
>>> @@ -686,7 +686,7 @@ static void do_rematrixing(AC3DecodeCont
>>>  static void do_imdct_256(AC3DecodeContext *ctx, int chindex)
>>>  {
>>>      int i, k;
>>> -    float x[128];
>>> +    DECLARE_ALIGNED_16(float, x[128]);
>>>      FFTComplex z[2][64];
>>>      float *o_ptr = ctx->tmp_output;
>>
>> This wont work on win32/beos with regular gcc's. Please use an array
>> allocated in the AC3DecodeContext.
>
> Rather than allocate more memory in the AC3DecodeContext, here is a 
> way to avoid the stack alignment issue by first deinterleaving the 
> MDCT coefficients within the already-allocated (and aligned) array.  
> Does this look okay?
>
> -Justin
>

Sure looks ok, this will save us some future bugreports.

MvH
Benjamin Larsson






More information about the ffmpeg-cvslog mailing list