mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
free existing strings before assigning new ones
This commit is contained in:
parent
8f75344ac2
commit
e417c4c656
3 changed files with 23 additions and 0 deletions
|
@ -279,6 +279,9 @@ ges_tl_title_src_set_text (GESTimelineTitleSource * self, const gchar * text)
|
|||
|
||||
GST_DEBUG ("self:%p, text:%s", self, text);
|
||||
|
||||
if (self->text)
|
||||
g_free (self->text);
|
||||
|
||||
self->text = g_strdup (text);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
|
@ -299,6 +302,9 @@ ges_tl_title_src_set_font_desc (GESTimelineTitleSource * self, const gchar *
|
|||
|
||||
GST_DEBUG ("self:%p, font_desc:%s", self, font_desc);
|
||||
|
||||
if (self->font_desc)
|
||||
g_free (self->font_desc);
|
||||
|
||||
self->font_desc = g_strdup (font_desc);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
|
|
|
@ -460,6 +460,12 @@ ges_type_timeline_transition_vtype_get_type (void)
|
|||
return the_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_transition_new:
|
||||
* @vtype: the type of transition to create
|
||||
*
|
||||
*/
|
||||
|
||||
GESTimelineTransition *
|
||||
ges_timeline_transition_new (gint vtype)
|
||||
{
|
||||
|
@ -471,6 +477,11 @@ ges_timeline_transition_new (gint vtype)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_transition_new_for_nick:
|
||||
* @nick: a string representing the type of transition to create
|
||||
*/
|
||||
|
||||
GESTimelineTransition *
|
||||
ges_timeline_transition_new_for_nick (gchar * nick)
|
||||
{
|
||||
|
|
|
@ -181,6 +181,9 @@ void
|
|||
ges_track_video_title_source_set_text (GESTrackVideoTitleSource * self,
|
||||
const gchar * text)
|
||||
{
|
||||
if (self->text)
|
||||
g_free (self->text);
|
||||
|
||||
self->text = g_strdup (text);
|
||||
if (self->text_el)
|
||||
g_object_set (self->text_el, "text", text, NULL);
|
||||
|
@ -199,6 +202,9 @@ void
|
|||
ges_track_video_title_source_set_font_desc (GESTrackVideoTitleSource * self,
|
||||
const gchar * font_desc)
|
||||
{
|
||||
if (self->font_desc)
|
||||
g_free (self->font_desc);
|
||||
|
||||
self->font_desc = g_strdup (font_desc);
|
||||
GST_LOG ("setting font-desc to '%s'", font_desc);
|
||||
if (self->text_el)
|
||||
|
|
Loading…
Reference in a new issue