[MPlayer-dev-eng] [PATCH] smartblur SEGV

Diego Biurrun diego at biurrun.de
Mon Oct 27 22:00:26 CET 2008


On Mon, Oct 27, 2008 at 09:11:15PM +0100, Michael Niedermayer wrote:
> On Mon, Oct 27, 2008 at 11:42:01AM +0100, Kurt Garloff wrote:
> > 
> > smartblur filter in mencoder crashes.
> > 
> > The reason is:
> > swScaler: Exactly one scaler algorithm must be choosen
> > so sws_getContext() return NULL and a call sws_scale(NULL, ...) crashes.
> > 
> > Either we pass a scaler alg to sws_getContext() in smartblur's 
> > allocStuff or we make sws_getContext() chose BICUBIC by default.
> > 
> > Patches for both approaches attached. At least one needs to be applied
> > to make smartblur work again.
> [...]
> > --- libmpcodecs/vf_smartblur.c	(revision 27834)
> > +++ libmpcodecs/vf_smartblur.c	(working copy)
> > @@ -93,7 +93,7 @@
> >  	swsF.chrH= swsF.chrV= NULL;
> >  	f->filterContext= sws_getContext(
> > -		width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, get_sws_cpuflags(), &swsF, NULL, NULL);
> > +		width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_BICUBIC | get_sws_cpuflags(), &swsF, NULL, NULL);
> 
> ok

Applied.

Diego



More information about the MPlayer-dev-eng mailing list