diff options
author | jstebbins <[email protected]> | 2008-12-01 18:21:43 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-12-01 18:21:43 +0000 |
commit | 829846d4d6810b2b1b90460e01cc84ecb6bf9590 (patch) | |
tree | 25d2a23ce743e089f7390b759e3f5f3c0a8f7142 | |
parent | cb1fdf0b003eefd0c4fec59ea65442ec6816294e (diff) |
LinGui: fix live preview scaling for PAR's < 1
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1982 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/preview.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |