[MPlayer-dev-eng] MPlayer/MEncoder crash on using -vf scale and expand together. Fix attached.

Alex C. alexc.xander at yahoo.in
Sat Oct 29 20:09:42 CEST 2011


On Sat, 2011-10-29 at 17:59 +0300, Ivan Kalvachev wrote:
> I don't hear any objections, so in few hours I'll commit it with the
> following message:
> ------------------------
> Ensure aligned stride for vf_scale output temp buffer.
> 
> The MP_IMGFLAG_PREFER_ALIDNED_STRIDE is honored only
> with MP_IMGTYPE_EXPORT, but vf_scale uses only MP_IMGTYPE_TEMP.
> As result stride won't be rounded up to a multiple of 16.
> 
> Use MP_IMGFLAG_ACCEPT_ALIDNED_STRIDE instead, as it works for
> all memory allocated image types..
> 
> Discovery and initial patch by alexc.xander.yahoo.in.
> Workarounds segfault in swscale sse3 code due to unaligned access.

Are you sure that shouldn't be MP_IMGFLAG_ACCEPT_ALIGNED? (D->G) :-)

Seriously,  though, it  would  be better  to  replace libswscale  with
another, cleaner,  scaling engine, even  if a little  slower. Possible
alternatives  would include  y4mscale and  AVISynth scaling,  and I've
also heard good things about DScaler. Maybe we can cherry-pick those.

---
AC
Live Free Or Die



More information about the MPlayer-dev-eng mailing list