diff --git a/ChangeLog b/ChangeLog index 6ae9bd6d5b..d02427a49e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-08-04 Jan Schmidt + + * sys/ximage/ximagesink.c: + (gst_ximagesink_calculate_pixel_aspect_ratio): + * sys/xvimage/xvimagesink.c: + (gst_xvimagesink_calculate_pixel_aspect_ratio): + Make sure we calculate pixel-aspect-ratio using floating point maths + 2004-08-03 Thomas Vander Stichele * po/uk.po: diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index fe0f1e2190..ea8dbfe619 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -689,7 +689,7 @@ gst_ximagesink_calculate_pixel_aspect_ratio (GstXContext * xcontext) /* first calculate the "real" ratio based on the X values; * which is the "physical" w/h divided by the w/h in pixels of the display */ - ratio = xcontext->widthmm * xcontext->height + ratio = (gdouble) (xcontext->widthmm * xcontext->height) / (xcontext->heightmm * xcontext->width); /* DirectFB's X in 720x576 reports the physical dimensions wrong, so diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 4a720f0fbf..1b9d6d5ce8 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -838,8 +838,9 @@ gst_xvimagesink_calculate_pixel_aspect_ratio (GstXContext * xcontext) /* first calculate the "real" ratio based on the X values; * which is the "physical" w/h divided by the w/h in pixels of the display */ - ratio = xcontext->widthmm * xcontext->height + ratio = (gdouble) (xcontext->widthmm * xcontext->height) / (xcontext->heightmm * xcontext->width); + /* DirectFB's X in 720x576 reports the physical dimensions wrong, so * override here */ if (xcontext->width == 720 && xcontext->height == 576) {