[FFmpeg-devel] [PATCH] libavfilter-soc: prevents division by zero in scale

Michael Niedermayer michaelni
Tue Jun 9 23:33:41 CEST 2009


On Tue, Jun 09, 2009 at 11:01:42PM +0200, Stefano Sabatini wrote:
> Hi, as in subject.
> 
> Regards.
> -- 
> FFmpeg = Faboulous and Fostering Multimedia Puristic Elegant Glue

>  vf_scale.c |    1 +
>  1 file changed, 1 insertion(+)
> 1d3e6890fe6ee1224e2dfc322463d24e73bcb4ee  scale-fix-gcd.patch
> Index: libavfilter-soc/ffmpeg/libavfilter/vf_scale.c
> ===================================================================
> --- libavfilter-soc.orig/ffmpeg/libavfilter/vf_scale.c	2009-06-09 22:57:53.000000000 +0200
> +++ libavfilter-soc/ffmpeg/libavfilter/vf_scale.c	2009-06-09 23:01:09.000000000 +0200
> @@ -137,6 +137,7 @@
>      out->outpic->pixel_aspect.den = picref->pixel_aspect.den * out->w * link->h;
>  
>      gcd = av_gcd(out->outpic->pixel_aspect.num, out->outpic->pixel_aspect.den);
if(gcd>1){
>      out->outpic->pixel_aspect.num /= gcd;
>      out->outpic->pixel_aspect.den /= gcd;
}


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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- 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/ffmpeg-devel/attachments/20090609/cb3e3348/attachment.pgp>



More information about the ffmpeg-devel mailing list