mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +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/6757>
This commit is contained in:
parent
0c81d1a1e7
commit
dd3344fd2e
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