- // XXX ffmpeg bug workaround
- // malloc a buffer for the audio decode. On an x86, ffmpeg
- // uses mmx/sse instructions on this buffer without checking
- // that it's 16 byte aligned and this will cause an abort if
- // the buffer is allocated on our stack. Rather than doing
- // complicated, machine dependent alignment here we use the
- // fact that malloc returns an aligned pointer on most architectures.
-
- #ifdef SYS_CYGWIN
- // Cygwin's malloc doesn't appear to return 16-byte aligned memory so use memalign instead.
- pv->buffer = memalign(16, AVCODEC_MAX_AUDIO_FRAME_SIZE);
- #else
- pv->buffer = malloc( AVCODEC_MAX_AUDIO_FRAME_SIZE );
- #endif
-