[email protected] writes: > Can I use AVPicture structure defined in the stack? I'm using > Microsoft Visual Studio 2008, and I've read about stack alignment > issues.
Recently there was a discussion on IRC about stack alignment in general. For gcc static memory can be aligned using gcc's alignment intrinsic, __attribute((aligned))__ and dynamic memory can be aligned using memalign(). av_malloc (av_mallocz) will align dynamically allocated memory using memalign(). If you are using ffmpeg libraries from Visual C++ you have to compile with mingw gcc. Here things are a bit different. Memory on the stack can be aligned using Visual C++ __declspec(align). Because memalign is either not available or not working in mingw ffmpeg needs to be compiled with --enable-memalign-hack. If this compiler flag is given av_malloc will emulate memalign. Have fun! Patrick _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
