From 829846d4d6810b2b1b90460e01cc84ecb6bf9590 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Mon, 1 Dec 2008 18:21:43 +0000 Subject: LinGui: fix live preview scaling for PAR's < 1 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1982 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/preview.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gtk/src') diff --git a/gtk/src/preview.c b/gtk/src/preview.c index c598c123a..20de012c0 100644 --- a/gtk/src/preview.c +++ b/gtk/src/preview.c @@ -214,7 +214,11 @@ caps_set(GstCaps *caps, preview_t *preview) gst_video_calculate_display_ratio( &num, &den, width, height, par_n, par_d, disp_par_n, disp_par_d); - width = gst_util_uint64_scale_int(height, num, den); + if (par_n > par_d) + width = gst_util_uint64_scale_int(height, num, den); + else + height = gst_util_uint64_scale_int(width, den, num); + if (width != preview->width || height != preview->height) { gtk_widget_set_size_request(preview->view, width, height); -- cgit v1.2.3