pipeline: Restrict the presence only if the user didn't explicitly provided one
authorThibault Saunier <tsaunier@igalia.com>
Thu, 9 Jul 2020 15:10:41 +0000 (11:10 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Thu, 30 Jul 2020 22:44:13 +0000 (18:44 -0400)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/198>

ges/ges-pipeline.c

index e714aa5..c57cc37 100644 (file)
@@ -1105,7 +1105,8 @@ ges_pipeline_set_render_settings (GESPipeline * pipeline,
 
       GST_DEBUG_OBJECT (pipeline, "Setting presence to 1!");
       gst_encoding_profile_set_single_segment (tmpprofiles->data, TRUE);
-      gst_encoding_profile_set_presence (tmpprofiles->data, 1);
+      if (gst_encoding_profile_get_presence (tmpprofiles->data) == 0)
+        gst_encoding_profile_set_presence (tmpprofiles->data, 1);
       gst_encoding_profile_set_allow_dynamic_output (tmpprofiles->data, FALSE);
     }
   }