summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-05-26 08:25:02 +0000
committerjstebbins <[email protected]>2012-05-26 08:25:02 +0000
commit89b5fd2675d556414ea988408193b8e21a63f159 (patch)
treefed0bb930475c2df7e42546c45fd566043205f69
parentc18c9394b6641f183a86aabfe496b41086eb1905 (diff)
LinGui: oops, fixed on sigsegv and created another :(
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4700 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/audiohandler.c2
-rw-r--r--gtk/src/hb-backend.c6
-rw-r--r--gtk/src/subtitlehandler.c3
3 files changed, 4 insertions, 7 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index 1388cfc60..5a9169cc5 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -376,7 +376,7 @@ ghb_set_pref_audio_settings(gint titleindex, GValue *settings)
// Find "best" audio based on audio preferences
if (!ghb_settings_get_boolean(settings, "AudioDUB"))
{
- source_lang = ghb_get_source_audio_lang(titleindex, 0);
+ source_lang = g_strdup(ghb_get_source_audio_lang(titleindex, 0));
}
else
{
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 692e17c33..52e94b9f3 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1500,10 +1500,10 @@ ghb_subtitle_track_lang(GValue *settings, gint track)
goto fail;
sub = hb_list_item( title->list_subtitle, track);
if (sub != NULL)
- return g_strdup(sub->iso639_2);
+ return sub->iso639_2;
fail:
- return g_strdup("und");
+ return "und";
}
gint
@@ -2370,7 +2370,7 @@ ghb_get_source_audio_lang(gint titleindex, gint track)
if (audio == NULL)
return lang;
- lang = g_strdup(audio->lang.iso639_2);
+ lang = audio->lang.iso639_2;
return lang;
}
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index 5b5036520..fee75f75b 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -434,7 +434,6 @@ ghb_set_pref_subtitle_settings(gint titleindex, GValue *settings)
found_cc = TRUE;
ghb_add_subtitle_to_settings(settings, dup);
jj++;
- g_free(lang);
}
}
if (foreign_lang_index < 0 && pref_lang != NULL)
@@ -506,8 +505,6 @@ ghb_set_pref_subtitle_settings(gint titleindex, GValue *settings)
}
if (pref_lang != NULL)
g_free(pref_lang);
- if (audio_lang != NULL)
- g_free(audio_lang);
g_hash_table_destroy(track_indices);
}