[MPlayer-dev-eng] Segfault caused by the "expand" filter

Zuxy Meng zuxy.meng at gmail.com
Tue Mar 15 03:57:28 CET 2011


Hi all,

Hope here's still atmosphere for technical discussions:

I met segfaults triggered by unaligned accesses of SSE instructions.
The root cause is within the get_image() function of the "expand"
filter, in lines like:

	if(mpi->flags&MP_IMGFLAG_PLANAR){
	    mpi->planes[0]=vf->dmpi->planes[0]+
		vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x;

Here vf->dmpi->planes[0] is 16-byte aligned, but mpi->planes[0] may not be.

I'm not sure what's the correct fix here. Would a simple forced align
before the assignment work (e.g. ((vf->dmpi->planes[0] + ...)&~15))?
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6


More information about the MPlayer-dev-eng mailing list