Commit ea9dc517 authored by John Stebbins's avatar John Stebbins

LinGui: plug memory leaks

parent 52eb74c6
......@@ -153,7 +153,7 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud, GhbValue *asettings)
ghb_ui_update(ud, "AudioBitrate",
ghb_dict_get_value(asettings, "Bitrate"));
gdouble quality = get_ui_quality(asettings);
ghb_ui_update(ud, "AudioTrackQualityX", ghb_double_value_new(quality));
ghb_ui_update(ud, "AudioTrackQualityX", ghb_double_value(quality));
ghb_ui_update(ud, "AudioSamplerate",
ghb_dict_get_value(asettings, "Samplerate"));
ghb_ui_update(ud, "AudioMixdown",
......@@ -400,7 +400,7 @@ void ghb_sanitize_audio_tracks(signal_user_data_t *ud)
ghb_ui_update(ud, "AudioBitrate",
ghb_dict_get_value(asettings, "Bitrate"));
gdouble quality = get_ui_quality(asettings);
ghb_ui_update(ud, "AudioTrackQualityX", ghb_double_value_new(quality));
ghb_ui_update(ud, "AudioTrackQualityX", ghb_double_value(quality));
ghb_ui_update(ud, "AudioSamplerate",
ghb_dict_get_value(asettings, "Samplerate"));
ghb_ui_update(ud, "AudioMixdown",
......@@ -464,6 +464,7 @@ audio_update_dialog_widgets(signal_user_data_t *ud, GhbValue *asettings)
drc = ghb_dict_get_double(asettings, "DRC");
s_drc = get_drc_string(drc);
ghb_ui_update(ud, "AudioTrackDRCValue", ghb_string_value(s_drc));
free(s_drc);
ghb_ui_update(ud, "AudioTrackGainSlider",
ghb_dict_get_value(asettings, "Gain"));
gain = ghb_dict_get_double(asettings, "Gain");
......@@ -473,9 +474,10 @@ audio_update_dialog_widgets(signal_user_data_t *ud, GhbValue *asettings)
int codec = ghb_settings_audio_encoder_codec(asettings, "Encoder");
quality = ghb_dict_get_double(asettings, "Quality");
qualityx = get_quality(codec, quality);
ghb_ui_update(ud, "AudioTrackQualityX", ghb_double_value_new(qualityx));
ghb_ui_update(ud, "AudioTrackQualityX", ghb_double_value(qualityx));
s_quality = get_quality_string(codec, quality);
ghb_ui_update(ud, "AudioTrackQualityValue", ghb_string_value(s_quality));
free(s_quality);
// Setting a radio button to FALSE does not automatically make
// the other one TRUE
qe = ghb_audio_quality_enabled(asettings);
......
......@@ -2459,6 +2459,7 @@ ghb_update_summary_info(signal_user_data_t *ud)
def = ghb_dict_get_bool(subsettings, "Default");
g_string_append_printf(str, "\n%s", desc);
free(desc);
if (force)
{
g_string_append_printf(str, ", Forced Only");
......@@ -4733,6 +4734,7 @@ when_complete_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
GhbValue * value = ghb_widget_value(widget);
ghb_ui_update(ud, "QueueWhenComplete", value);
ghb_value_free(&value);
ghb_widget_to_setting (ud->prefs, widget);
......@@ -4747,6 +4749,7 @@ queue_when_complete_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
GhbValue * value = ghb_widget_value(widget);
ghb_ui_update(ud, "WhenComplete", value);
ghb_value_free(&value);
}
G_MODULE_EXPORT void
......
......@@ -101,6 +101,7 @@ create_chapter_row(int index, int64_t start, int64_t duration,
str = g_strdup_printf("%d", index);
label = gtk_label_new(str);
free(str);
gtk_label_set_width_chars(GTK_LABEL(label), 5);
gtk_label_set_xalign(GTK_LABEL(label), 0);
ghb_box_append_child(hbox, label);
......@@ -108,6 +109,7 @@ create_chapter_row(int index, int64_t start, int64_t duration,
ghb_break_duration(start, &hh, &mm, &ss);
str = g_strdup_printf("%02d:%02d:%02d", hh, mm, ss);
label = gtk_label_new(str);
free(str);
gtk_label_set_width_chars(GTK_LABEL(label), 10);
gtk_label_set_xalign(GTK_LABEL(label), 1);
ghb_box_append_child(hbox, label);
......@@ -115,6 +117,7 @@ create_chapter_row(int index, int64_t start, int64_t duration,
ghb_break_duration(duration, &hh, &mm, &ss);
str = g_strdup_printf("%02d:%02d:%02d", hh, mm, ss);
label = gtk_label_new(str);
free(str);
gtk_label_set_width_chars(GTK_LABEL(label), 10);
gtk_label_set_xalign(GTK_LABEL(label), 1);
ghb_box_append_child(hbox, label);
......
......@@ -588,6 +588,7 @@ queue_update_summary(GhbValue * queueDict, signal_user_data_t *ud)
def = ghb_dict_get_bool(subsettings, "Default");
g_string_append_printf(str, "%s%s", sep, desc);
free(desc);
if (force)
{
g_string_append_printf(str, _(", Forced Only"));
......
......@@ -830,7 +830,7 @@ subtitle_forced_toggled_cb(GtkWidget *widget, signal_user_data_t *ud)
{
ghb_widget_to_setting(ud->settings, widget);
GhbValue *val = ghb_widget_value(widget);
subtitle_update_setting(ghb_value_dup(val), "Forced", ud);
subtitle_update_setting(val, "Forced", ud);
}
G_MODULE_EXPORT void
......@@ -841,7 +841,7 @@ subtitle_burned_toggled_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_widget_to_setting(ud->settings, widget);
GhbValue *val = ghb_widget_value(widget);
subtitle_update_setting(ghb_value_dup(val), "Burn", ud);
subtitle_update_setting(val, "Burn", ud);
subsettings = subtitle_get_selected_settings(ud, &index);
if (subsettings != NULL)
{
......@@ -862,7 +862,7 @@ subtitle_default_toggled_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_widget_to_setting(ud->settings, widget);
GhbValue *val = ghb_widget_value(widget);
subtitle_update_setting(ghb_value_dup(val), "Default", ud);
subtitle_update_setting(val, "Default", ud);
subsettings = subtitle_get_selected_settings(ud, &index);
if (subsettings != NULL)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment