[FFmpeg-soc] [soc]: r4407 - libavfilter/vf_scale.c
stefano
subversion at mplayerhq.hu
Thu Jun 11 00:17:38 CEST 2009
Author: stefano
Date: Thu Jun 11 00:17:37 2009
New Revision: 4407
Log:
Prevent division by zero when gcd in start_frame() is 0.
Modified:
libavfilter/vf_scale.c
Modified: libavfilter/vf_scale.c
==============================================================================
--- libavfilter/vf_scale.c Wed Jun 10 20:39:40 2009 (r4406)
+++ libavfilter/vf_scale.c Thu Jun 11 00:17:37 2009 (r4407)
@@ -137,8 +137,10 @@ static void start_frame(AVFilterLink *li
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;
+ }
avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
More information about the FFmpeg-soc
mailing list