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

Michael Niedermayer michaelni at gmx.at
Mon Oct 27 21:11:15 CET 2008


On Mon, Oct 27, 2008 at 11:42:01AM +0100, Kurt Garloff wrote:
> Hi,
> 
> 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.
[...]
> Index: libmpcodecs/vf_smartblur.c
> ===================================================================
> --- libmpcodecs/vf_smartblur.c	(revision 27834)
> +++ libmpcodecs/vf_smartblur.c	(working copy)
> @@ -93,7 +93,7 @@
>  	swsF.lumH= swsF.lumV= vec;
>  	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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081027/db1ea27f/attachment.pgp>


More information about the MPlayer-dev-eng mailing list