mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
ges-pipeline: Configure encodebin before linking
Modifying the `avoid-reencoding` property of `encodebin` could potentially cause it to reconfigure itself, in which case the source pad will be removed and then re-added. Therefore set that property *before* attempting to link to that pad. Fixes smart-render Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6785>
This commit is contained in:
parent
f74bdaf4d5
commit
51fd0f16a3
1 changed files with 2 additions and 2 deletions
|
@ -1270,6 +1270,8 @@ ges_pipeline_set_mode (GESPipeline * pipeline, GESPipelineFlags mode)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
g_object_set (pipeline->priv->encodebin, "avoid-reencoding",
|
||||
!(!(mode & GES_PIPELINE_MODE_SMART_RENDER)), NULL);
|
||||
if (!gst_bin_add (GST_BIN_CAST (pipeline), pipeline->priv->encodebin)) {
|
||||
GST_ERROR_OBJECT (pipeline, "Couldn't add encodebin");
|
||||
return FALSE;
|
||||
|
@ -1294,8 +1296,6 @@ ges_pipeline_set_mode (GESPipeline * pipeline, GESPipelineFlags mode)
|
|||
GST_INFO_OBJECT (pipeline,
|
||||
"Using an muxing sink, not adding any sink element");
|
||||
}
|
||||
g_object_set (pipeline->priv->encodebin, "avoid-reencoding",
|
||||
!(!(mode & GES_PIPELINE_MODE_SMART_RENDER)), NULL);
|
||||
}
|
||||
|
||||
if (pipeline->priv->timeline) {
|
||||
|
|
Loading…
Reference in a new issue