GESTimelinePipeline: Make a copy of the provided GstEncodingProfile

This commit is contained in:
Edward Hervey 2010-06-21 11:53:30 +02:00
parent 6fe60cb694
commit 575c4865a0

View file

@ -74,6 +74,11 @@ ges_timeline_pipeline_dispose (GObject * object)
self->encodebin = NULL;
}
if (self->profile) {
gst_encoding_profile_free (self->profile);
self->profile = NULL;
}
G_OBJECT_CLASS (ges_timeline_pipeline_parent_class)->dispose (object);
}
@ -534,10 +539,13 @@ ges_timeline_pipeline_add_timeline (GESTimelinePipeline * pipeline,
* ges_timeline_pipeline_set_render_settings:
* @pipeline: a #GESTimelinePipeline
* @output_uri: the %URI to which the timeline will be rendered
* @profile: the #GstEncodingProfile to use to render the timeline
* @profile: the #GstEncodingProfile to use to render the timeline.
*
* Specify where the pipeline shall be rendered and with what settings.
*
* A copy of @profile and @output_uri will be done internally, the caller can
* safely free those values afterwards.
*
* This method must be called before setting the pipeline mode to
* #TIMELINE_MODE_RENDER
*
@ -563,8 +571,10 @@ ges_timeline_pipeline_set_render_settings (GESTimelinePipeline * pipeline,
return FALSE;
}
if (pipeline->profile)
gst_encoding_profile_free (pipeline->profile);
g_object_set (pipeline->encodebin, "profile", profile, NULL);
pipeline->profile = profile;
pipeline->profile = gst_encoding_profile_copy (profile);
return TRUE;
}