OSDN Git Service

LinGui: update decomb filter string validation.
[handbrake-jp/handbrake-jp-git.git] / gtk / src / hb-backend.c
index 1edabda..db91998 100644 (file)
@@ -3144,10 +3144,8 @@ ghb_set_scale(signal_user_data_t *ud, gint mode)
                        width = ((double)height * crop_width / crop_height) + 0.5;
                job->width = width;
                job->height = height;
-               if (max_width) 
-                       job->maxWidth = max_width;
-               if (max_height) 
-                       job->maxHeight = max_height;
+               job->maxWidth = max_width;
+               job->maxHeight = max_height;
                job->crop[0] = crop[0]; job->crop[1] = crop[1];
                job->crop[2] = crop[2]; job->crop[3] = crop[3];
                if (job->anamorphic.mode == 3 && !keep_aspect)
@@ -3165,9 +3163,7 @@ ghb_set_scale(signal_user_data_t *ud, gint mode)
                                job->anamorphic.dar_width = 
                                        ghb_settings_get_int(ud->settings, 
                                                                                "PictureDisplayWidth");
-                               job->anamorphic.dar_height =
-                                       ghb_settings_get_int(ud->settings, 
-                                                                               "PictureDisplayHeight");
+                               job->anamorphic.dar_height = height;
                        }
                }
                else
@@ -3382,7 +3378,7 @@ ghb_validate_filters(signal_user_data_t *ud)
        gint index;
        gchar *message;
 
-       // deinte 4
+       // deinte
        index = ghb_settings_combo_int(ud->settings, "PictureDeinterlace");
        if (index == 1)
        {
@@ -3416,12 +3412,12 @@ ghb_validate_filters(signal_user_data_t *ud)
                }
                g_free(str);
        }
-       // decomb 4
+       // decomb
        index = ghb_settings_combo_int(ud->settings, "PictureDecomb");
        if (index == 1)
        {
                str = ghb_settings_get_string(ud->settings, "PictureDecombCustom");
-               if (!ghb_validate_filter_string(str, 7))
+               if (!ghb_validate_filter_string(str, 15))
                {
                        message = g_strdup_printf(
                                                "Invalid Decomb Settings:\n\n%s\n",
@@ -3433,7 +3429,7 @@ ghb_validate_filters(signal_user_data_t *ud)
                }
                g_free(str);
        }
-       // denois 4
+       // denois
        index = ghb_settings_combo_int(ud->settings, "PictureDenoise");
        if (index == 1)
        {
@@ -4187,6 +4183,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
        gint subtitle;
        gboolean force, burned, def, one_burned = FALSE;
        
+       ghb_settings_set_boolean(js, "subtitle_scan", FALSE);
        subtitle_list = ghb_settings_get_value(js, "subtitle_list");
        count = ghb_array_len(subtitle_list);
        for (ii = 0; ii < count; ii++)
@@ -4251,6 +4248,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                        job->select_subtitle_config.force = force;
                        job->select_subtitle_config.default_track = def;
                        job->indepth_scan = 1;
+                       ghb_settings_set_boolean(js, "subtitle_scan", TRUE);
                }
                else if (subtitle >= 0)
                {
@@ -4491,11 +4489,13 @@ ghb_pause_queue()
 
     if( s.state == HB_STATE_PAUSED )
     {
-        hb_resume( h_queue );
+               hb_status.queue.state &= ~GHB_STATE_PAUSED;
+               hb_resume( h_queue );
     }
     else
     {
-        hb_pause( h_queue );
+               hb_status.queue.state |= GHB_STATE_PAUSED;
+               hb_pause( h_queue );
     }
 }