[FFmpeg-cvslog] ass: fix DAR calculation.

Michael Niedermayer git at videolan.org
Fri Mar 16 04:50:46 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 16 04:35:21 2012 +0100| [b89f94077d85c33cac4a99ccfb024bbb284a8bab] | committer: Michael Niedermayer

ass: fix DAR calculation.

Found-by: REN Lifeng <renlifeng at wowfly.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b89f94077d85c33cac4a99ccfb024bbb284a8bab
---

 libavfilter/vf_ass.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vf_ass.c b/libavfilter/vf_ass.c
index 7ef78f1..774ea09 100644
--- a/libavfilter/vf_ass.c
+++ b/libavfilter/vf_ass.c
@@ -134,7 +134,7 @@ static int config_input(AVFilterLink *inlink)
     const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format];
     double sar = inlink->sample_aspect_ratio.num ?
         av_q2d(inlink->sample_aspect_ratio) : 1;
-    double dar = inlink->w / inlink->h * sar;
+    double dar = inlink->w / (double)inlink->h * sar;
 
     av_image_fill_max_pixsteps(ass->pix_step, NULL, pix_desc);
     ff_fill_rgba_map(ass->rgba_map, inlink->format);



More information about the ffmpeg-cvslog mailing list