summaryrefslogtreecommitdiffstats
path: root/gtk/src/queuehandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-02-21 00:23:37 +0000
committerjstebbins <[email protected]>2014-02-21 00:23:37 +0000
commitd206a74fb8500b64310b75be8db08ec9e0a972f5 (patch)
tree15941705a5f17d83f29e2b28fc1d548fe5aab9e3 /gtk/src/queuehandler.c
parentcc82c19b2f52a7527615ccbae34154e0085b6708 (diff)
LinGui: fix range update issues and plug memory leaks
Updating the range of GtkScale and GtkSpinButtons causes the current value to update inappropriately under some conditions. So update the range and value concurrently. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6051 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/queuehandler.c')
-rw-r--r--gtk/src/queuehandler.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index 9725bd1bd..507b3cc08 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -195,6 +195,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
escape = g_markup_escape_text(dest, -1);
g_string_append_printf(str,
"<b>Destination:</b> <small>%s</small>\n", escape);
+ g_free(escape);
width = ghb_settings_get_int(settings, "scale_width");
height = ghb_settings_get_int(settings, "scale_height");
@@ -388,6 +389,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
g_string_append_printf(str,
"<b>Video:</b> <small>%s, Framerate: %s, %s %s%s</small>\n",
vcodec, fps, vq_desc, vqstr, vq_units);
+ g_free(vqstr);
turbo = ghb_settings_get_boolean(settings, "VideoTurboTwoPass");
if (turbo)
@@ -427,12 +429,12 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
}
else
{
- const char *br;
+ char *br;
br = ghb_settings_get_string(asettings, "AudioBitrate");
quality = g_strdup_printf("Bitrate: %s", br);
+ g_free(br);
}
sr = ghb_settings_get_double(asettings, "AudioSamplerate");
- samplerate = ghb_settings_get_string(asettings, "AudioSamplerate");
if ((int)sr == 0)
{
samplerate = g_strdup("Same As Source");
@@ -776,8 +778,8 @@ queue_remove_clicked_cb(GtkWidget *widget, gchar *path, signal_user_data_t *ud)
gtk_tree_store_remove(GTK_TREE_STORE(store), &iter);
// Remove the corresponding item from the queue list
GValue *old = ghb_array_get_nth(ud->queue, row);
- ghb_value_free(old);
ghb_array_remove(ud->queue, row);
+ ghb_value_free(old);
ghb_save_queue(ud->queue);
}
else
@@ -1293,6 +1295,10 @@ find_pid:
}
g_free(message);
}
+ else
+ {
+ ghb_value_free(queue);
+ }
return FALSE;
}