OSDN Git Service

LinGui: place limits on crop to prevent creating images sizes that are not supported
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 15 Nov 2009 20:47:27 +0000 (20:47 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 15 Nov 2009 20:47:27 +0000 (20:47 +0000)
and cause a segfault

git-svn-id: svn://localhost/HandBrake/trunk@2937 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c

index ea93955..532ac69 100644 (file)
@@ -1360,12 +1360,12 @@ show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo)
        // Set the limits of cropping.  hb_set_anamorphic_size crashes if
        // you pass it a cropped width or height == 0.
        gint bound;
-       bound = tinfo->height / 2 - 2;
+       bound = tinfo->height / 2 - 8;
        widget = GHB_WIDGET (ud->builder, "PictureTopCrop");
        gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
        widget = GHB_WIDGET (ud->builder, "PictureBottomCrop");
        gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
-       bound = tinfo->width / 2 - 2;
+       bound = tinfo->width / 2 - 8;
        widget = GHB_WIDGET (ud->builder, "PictureLeftCrop");
        gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
        widget = GHB_WIDGET (ud->builder, "PictureRightCrop");