summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/src/callbacks.c21
-rw-r--r--gtk/src/queuehandler.c5
-rw-r--r--gtk/src/subtitlehandler.c1
3 files changed, 17 insertions, 10 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index d496187ac..eba677c6d 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2203,6 +2203,7 @@ ghb_update_summary_info(signal_user_data_t *ud)
}
rate_str = get_rate_string(vrate.num, vrate.den);
g_string_append_printf(str, "%s, %s FPS", video_encoder->name, rate_str);
+ g_free(rate_str);
if (ghb_dict_get_bool(ud->settings, "VideoFramerateCFR"))
{
g_string_append_printf(str, " CFR");
@@ -2470,6 +2471,7 @@ ghb_update_summary_info(signal_user_data_t *ud)
g_free(text);
g_free(display_aspect);
+ ghb_value_free(&titleDict);
}
void
@@ -2485,6 +2487,7 @@ ghb_set_title_settings(signal_user_data_t *ud, GhbValue *settings)
if (title != NULL)
{
GhbValue *job_dict;
+ char * label;
job_dict = hb_preset_job_init(ghb_scan_handle(), title_id, settings);
ghb_dict_set(settings, "Job", job_dict);
@@ -2498,10 +2501,12 @@ ghb_set_title_settings(signal_user_data_t *ud, GhbValue *settings)
ghb_dict_set_int(settings, "source_width", title->geometry.width);
ghb_dict_set_int(settings, "source_height", title->geometry.height);
ghb_dict_set_string(settings, "source", title->path);
- ghb_dict_set_string(settings, "source_label",
- ghb_create_source_label(title));
- ghb_dict_set_string(settings, "volume",
- ghb_create_volume_label(title));
+ label = ghb_create_source_label(title);
+ ghb_dict_set_string(settings, "source_label", label);
+ g_free(label);
+ label = ghb_create_volume_label(title);
+ ghb_dict_set_string(settings, "volume", label);
+ g_free(label);
int crop[4];
@@ -2651,14 +2656,15 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
gint title_id, titleindex, count;
const hb_title_t * title;
GtkLabel * title_label;
- const char * opt;
+ char * label;
title_id = ghb_widget_int(widget);
title = ghb_lookup_title(title_id, &titleindex);
- opt = ghb_create_title_label(title);
+ label = ghb_create_title_label(title);
title_label = GTK_LABEL(GHB_WIDGET(ud->builder, "title_label"));
- gtk_label_set_markup(title_label, opt);
+ gtk_label_set_markup(title_label, label);
+ g_free(label);
count = ghb_array_len(ud->settings_array);
int idx = (titleindex >= 0 && titleindex < count) ? titleindex : 0;
@@ -5601,6 +5607,7 @@ ghb_notify_done(signal_user_data_t *ud)
g_application_send_notification(G_APPLICATION(ud->app), "cocktail", notification);
g_object_unref(G_OBJECT(notification));
+ g_object_unref(G_OBJECT(icon));
if (ghb_settings_combo_int(ud->prefs, "WhenComplete") == 3)
{
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index 6cf0779f9..8c39fe44c 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -1036,7 +1036,7 @@ ghb_dest_free_space(GhbValue *settings)
{
GFile *gfile;
GFileInfo *info;
- guint64 size;
+ guint64 size = -1;
const gchar *dest = ghb_dict_get_string(settings, "destination");
gchar *destdir = g_path_get_dirname(dest);
gchar *resolved = ghb_resolve_symlink(destdir);
@@ -1050,7 +1050,6 @@ ghb_dest_free_space(GhbValue *settings)
{
size = g_file_info_get_attribute_uint64(info,
G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
- return size;
}
g_object_unref(info);
}
@@ -1058,7 +1057,7 @@ ghb_dest_free_space(GhbValue *settings)
g_free(resolved);
g_free(destdir);
- return -1;
+ return size;
}
gint
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index 9297c0968..881996d99 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -1532,6 +1532,7 @@ static void subtitle_def_selected_lang_list_clear(signal_user_data_t *ud)
gtk_tree_store_append(avail_ts, &pos, NULL);
}
gtk_tree_store_set(avail_ts, &pos, 0, lang, 1, index, -1);
+ g_free(lang);
} while (gtk_tree_model_iter_next(selected_tm, &iter));
}
gtk_tree_store_clear(GTK_TREE_STORE(selected_tm));