[MPlayer-dev-eng] [CRASH] mpi->planes[0] needs to be aligned at least to 16 byte or put_pixels16_sse2 will crash

Zuxy Meng zuxy.meng at gmail.com
Wed Mar 17 06:46:59 CET 2010


Hi,

2010/3/16 Gianluigi Tiesi <mplayer at netfarm.it>:
> I've noticed that memalign is an alias for malloc on mingw
> and mp images allocates planes this way:
> memalign(64, mpi...)
>
> after some functions in libavcodec:
>
>
> put_pixels16_sse2(uint8_t *block
>
> block is not 16bytes aligned
> and it crashes on p4
>
> I think we may need to make custom alloc/dealloc/strdup functions
> to avoid these problems, mingwex offers:
>
> __mingw_aligned_malloc
> __mingw_aligned_realloc
> __mingw_aligned_free
>
> that can be used for this
>

I mentioned this in another thread several days ago. To fix it once
and for all we'd substitute all call to malloc/memalign and free to
av_malloc and av_free across mplayer, but I can't think of a graceful
way to do this in win32. I tried defining my own malloc/memalign and
free and linking it before libmsvcrt but it didn't work.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the MPlayer-dev-eng mailing list