mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +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);
|
GST_DEBUG ("self:%p, text:%s", self, text);
|
||||||
|
|
||||||
|
if (self->text)
|
||||||
|
g_free (self->text);
|
||||||
|
|
||||||
self->text = g_strdup (text);
|
self->text = g_strdup (text);
|
||||||
|
|
||||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
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);
|
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);
|
self->font_desc = g_strdup (font_desc);
|
||||||
|
|
||||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||||
|
|
|
@ -460,6 +460,12 @@ ges_type_timeline_transition_vtype_get_type (void)
|
||||||
return the_type;
|
return the_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ges_timeline_transition_new:
|
||||||
|
* @vtype: the type of transition to create
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
GESTimelineTransition *
|
GESTimelineTransition *
|
||||||
ges_timeline_transition_new (gint vtype)
|
ges_timeline_transition_new (gint vtype)
|
||||||
{
|
{
|
||||||
|
@ -471,6 +477,11 @@ ges_timeline_transition_new (gint vtype)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ges_timeline_transition_new_for_nick:
|
||||||
|
* @nick: a string representing the type of transition to create
|
||||||
|
*/
|
||||||
|
|
||||||
GESTimelineTransition *
|
GESTimelineTransition *
|
||||||
ges_timeline_transition_new_for_nick (gchar * nick)
|
ges_timeline_transition_new_for_nick (gchar * nick)
|
||||||
{
|
{
|
||||||
|
|
|
@ -181,6 +181,9 @@ void
|
||||||
ges_track_video_title_source_set_text (GESTrackVideoTitleSource * self,
|
ges_track_video_title_source_set_text (GESTrackVideoTitleSource * self,
|
||||||
const gchar * text)
|
const gchar * text)
|
||||||
{
|
{
|
||||||
|
if (self->text)
|
||||||
|
g_free (self->text);
|
||||||
|
|
||||||
self->text = g_strdup (text);
|
self->text = g_strdup (text);
|
||||||
if (self->text_el)
|
if (self->text_el)
|
||||||
g_object_set (self->text_el, "text", text, NULL);
|
g_object_set (self->text_el, "text", text, NULL);
|
||||||
|
@ -199,6 +202,9 @@ void
|
||||||
ges_track_video_title_source_set_font_desc (GESTrackVideoTitleSource * self,
|
ges_track_video_title_source_set_font_desc (GESTrackVideoTitleSource * self,
|
||||||
const gchar * font_desc)
|
const gchar * font_desc)
|
||||||
{
|
{
|
||||||
|
if (self->font_desc)
|
||||||
|
g_free (self->font_desc);
|
||||||
|
|
||||||
self->font_desc = g_strdup (font_desc);
|
self->font_desc = g_strdup (font_desc);
|
||||||
GST_LOG ("setting font-desc to '%s'", font_desc);
|
GST_LOG ("setting font-desc to '%s'", font_desc);
|
||||||
if (self->text_el)
|
if (self->text_el)
|
||||||
|
|
Loading…
Reference in a new issue