mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
validate:scenario: Keep a reference to 'description' structure
For it to be reusable outside the scenario
This commit is contained in:
parent
71fe16fd1c
commit
258453a169
2 changed files with 7 additions and 2 deletions
|
@ -3378,6 +3378,7 @@ _load_scenario_file (GstValidateScenario * scenario,
|
|||
&priv->max_latency);
|
||||
|
||||
gst_structure_get_int (structure, "max-dropped", &priv->max_dropped);
|
||||
scenario->description = gst_structure_copy (structure);
|
||||
|
||||
continue;
|
||||
} else if (!g_strcmp0 (type, "include")) {
|
||||
|
@ -3736,7 +3737,8 @@ gst_validate_scenario_dispose (GObject * object)
|
|||
static void
|
||||
gst_validate_scenario_finalize (GObject * object)
|
||||
{
|
||||
GstValidateScenarioPrivate *priv = GST_VALIDATE_SCENARIO (object)->priv;
|
||||
GstValidateScenario *self = GST_VALIDATE_SCENARIO (object);
|
||||
GstValidateScenarioPrivate *priv = self->priv;
|
||||
|
||||
/* Because g_object_add_weak_pointer() is used, this MUST be on the
|
||||
* main thread. */
|
||||
|
@ -3750,6 +3752,8 @@ gst_validate_scenario_finalize (GObject * object)
|
|||
(GDestroyNotify) gst_mini_object_unref);
|
||||
g_free (priv->pipeline_name);
|
||||
gst_structure_free (priv->vars);
|
||||
if (self->description)
|
||||
gst_structure_free (self->description);
|
||||
g_mutex_clear (&priv->lock);
|
||||
|
||||
G_OBJECT_CLASS (gst_validate_scenario_parent_class)->finalize (object);
|
||||
|
|
|
@ -271,12 +271,13 @@ struct _GstValidateScenario
|
|||
GstObject parent;
|
||||
|
||||
/*< public >*/
|
||||
GstStructure *description;
|
||||
|
||||
/*< private >*/
|
||||
GstValidateScenarioPrivate *priv;
|
||||
|
||||
union {
|
||||
gpointer _gst_reserved[GST_PADDING + 1];
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
struct {
|
||||
GMutex eos_handling_lock;
|
||||
} abi;
|
||||
|
|
Loading…
Reference in a new issue