From c080e7041d0e785cf09abcfb2e7620a7bb8216cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 2 Apr 2024 14:46:32 +0200 Subject: [PATCH] dash: sink references of all MDP objects Part-of: --- .../gst-plugins-bad/ext/dash/gstmpdadaptationsetnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdbaseurlnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdcontentcomponentnode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpddescriptortypenode.c | 1 + subprojects/gst-plugins-bad/ext/dash/gstmpdlocationnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsnode.c | 5 ++++- .../gst-plugins-bad/ext/dash/gstmpdmetricsrangenode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdperiodnode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdprograminformationnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdreportingnode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdrepresentationnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdrootnode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdsegmentbasenode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdsegmentlistnode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdsegmenttemplatenode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdsegmenttimelinenode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenturlnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdsnode.c | 6 +++++- .../gst-plugins-bad/ext/dash/gstmpdsubrepresentationnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdsubsetnode.c | 6 +++++- subprojects/gst-plugins-bad/ext/dash/gstmpdurltypenode.c | 1 + subprojects/gst-plugins-bad/ext/dash/gstmpdutctimingnode.c | 6 +++++- 23 files changed, 106 insertions(+), 21 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdadaptationsetnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdadaptationsetnode.c index 504a846661..d831f2b5a2 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdadaptationsetnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdadaptationsetnode.c @@ -262,7 +262,11 @@ gst_mpd_adaptation_set_node_init (GstMPDAdaptationSetNode * self) GstMPDAdaptationSetNode * gst_mpd_adaptation_set_node_new (void) { - return g_object_new (GST_TYPE_MPD_ADAPTATION_SET_NODE, NULL); + GstMPDAdaptationSetNode *ret; + + ret = g_object_new (GST_TYPE_MPD_ADAPTATION_SET_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdbaseurlnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdbaseurlnode.c index 651927212c..1bb34b206d 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdbaseurlnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdbaseurlnode.c @@ -155,7 +155,11 @@ gst_mpd_baseurl_node_init (GstMPDBaseURLNode * self) GstMPDBaseURLNode * gst_mpd_baseurl_node_new (void) { - return g_object_new (GST_TYPE_MPD_BASEURL_NODE, NULL); + GstMPDBaseURLNode *ret; + + ret = g_object_new (GST_TYPE_MPD_BASEURL_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c index 7ee85382be..9be0bd02b9 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c @@ -459,9 +459,13 @@ gst_mpd_client_init (GstMPDClient * client) GstMPDClient * gst_mpd_client_new (void) { + GstMPDClient *ret; + GST_DEBUG_CATEGORY_INIT (gst_dash_mpd_client_debug, "dashmpdclient", 0, "DashmMpdClient"); - return g_object_new (GST_TYPE_MPD_CLIENT, NULL); + ret = g_object_new (GST_TYPE_MPD_CLIENT, NULL); + gst_object_ref_sink (ret); + return ret; } GstMPDClient * diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdcontentcomponentnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdcontentcomponentnode.c index 9498aa4934..9da3a18a1b 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdcontentcomponentnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdcontentcomponentnode.c @@ -109,7 +109,11 @@ gst_mpd_content_component_node_init (GstMPDContentComponentNode * self) GstMPDContentComponentNode * gst_mpd_content_component_node_new (void) { - return g_object_new (GST_TYPE_MPD_CONTENT_COMPONENT_NODE, NULL); + GstMPDContentComponentNode *ret; + + ret = g_object_new (GST_TYPE_MPD_CONTENT_COMPONENT_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpddescriptortypenode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpddescriptortypenode.c index a91d4b00ac..d4bdde0160 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpddescriptortypenode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpddescriptortypenode.c @@ -88,6 +88,7 @@ gst_mpd_descriptor_type_node_new (const gchar * name) GstMPDDescriptorTypeNode *self = g_object_new (GST_TYPE_MPD_DESCRIPTOR_TYPE_NODE, NULL); self->node_name = g_strdup (name); + gst_object_ref_sink (self); return self; } diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdlocationnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdlocationnode.c index 69459be4b9..19e2fe65cc 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdlocationnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdlocationnode.c @@ -73,7 +73,11 @@ gst_mpd_location_node_init (GstMPDLocationNode * self) GstMPDLocationNode * gst_mpd_location_node_new (void) { - return g_object_new (GST_TYPE_MPD_LOCATION_NODE, NULL); + GstMPDLocationNode *ret; + + ret = g_object_new (GST_TYPE_MPD_LOCATION_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsnode.c index 79d6c5c62c..e5e60e91a4 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsnode.c @@ -83,7 +83,10 @@ gst_mpd_metrics_node_init (GstMPDMetricsNode * self) GstMPDMetricsNode * gst_mpd_metrics_node_new (void) { - return g_object_new (GST_TYPE_MPD_METRICS_NODE, NULL); + GstMPDMetricsNode *ret; + ret = g_object_new (GST_TYPE_MPD_METRICS_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsrangenode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsrangenode.c index 5ceb498398..7cabab2037 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsrangenode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdmetricsrangenode.c @@ -64,7 +64,11 @@ gst_mpd_metrics_range_node_init (GstMPDMetricsRangeNode * self) GstMPDMetricsRangeNode * gst_mpd_metrics_range_node_new (void) { - return g_object_new (GST_TYPE_MPD_METRICS_RANGE_NODE, NULL); + GstMPDMetricsRangeNode *ret; + + ret = g_object_new (GST_TYPE_MPD_METRICS_RANGE_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdperiodnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdperiodnode.c index 7b18b9f29a..8cde447388 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdperiodnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdperiodnode.c @@ -203,7 +203,11 @@ gst_mpd_period_node_init (GstMPDPeriodNode * self) GstMPDPeriodNode * gst_mpd_period_node_new (void) { - return g_object_new (GST_TYPE_MPD_PERIOD_NODE, NULL); + GstMPDPeriodNode *ret; + + ret = g_object_new (GST_TYPE_MPD_PERIOD_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdprograminformationnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdprograminformationnode.c index 69550fa8cf..03320d3209 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdprograminformationnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdprograminformationnode.c @@ -114,7 +114,11 @@ gst_mpd_program_information_node_init (GstMPDProgramInformationNode * self) GstMPDProgramInformationNode * gst_mpd_program_information_node_new (void) { - return g_object_new (GST_TYPE_MPD_PROGRAM_INFORMATION_NODE, NULL); + GstMPDProgramInformationNode *ret; + + ret = g_object_new (GST_TYPE_MPD_PROGRAM_INFORMATION_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdreportingnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdreportingnode.c index fa81eb5de4..ea0d4c1d31 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdreportingnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdreportingnode.c @@ -53,7 +53,11 @@ gst_mpd_reporting_node_init (GstMPDReportingNode * self) GstMPDReportingNode * gst_mpd_reporting_node_new (void) { - return g_object_new (GST_TYPE_MPD_REPORTING_NODE, NULL); + GstMPDReportingNode *ret; + + ret = g_object_new (GST_TYPE_MPD_REPORTING_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdrepresentationnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdrepresentationnode.c index 151e05aeea..a57656da4b 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdrepresentationnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdrepresentationnode.c @@ -187,7 +187,11 @@ gst_mpd_representation_node_init (GstMPDRepresentationNode * self) GstMPDRepresentationNode * gst_mpd_representation_node_new (void) { - return g_object_new (GST_TYPE_MPD_REPRESENTATION_NODE, NULL); + GstMPDRepresentationNode *ret; + + ret = g_object_new (GST_TYPE_MPD_REPRESENTATION_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdrootnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdrootnode.c index c73dce2bb4..a3a0c073b8 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdrootnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdrootnode.c @@ -405,7 +405,11 @@ gst_mpd_root_node_init (GstMPDRootNode * self) GstMPDRootNode * gst_mpd_root_node_new (void) { - return g_object_new (GST_TYPE_MPD_ROOT_NODE, NULL); + GstMPDRootNode *ret; + + ret = g_object_new (GST_TYPE_MPD_ROOT_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentbasenode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentbasenode.c index e492197d25..dc6b8fe650 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentbasenode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentbasenode.c @@ -101,7 +101,11 @@ gst_mpd_segment_base_node_init (GstMPDSegmentBaseNode * self) GstMPDSegmentBaseNode * gst_mpd_segment_base_node_new (void) { - return g_object_new (GST_TYPE_MPD_SEGMENT_BASE_NODE, NULL); + GstMPDSegmentBaseNode *ret; + + ret = g_object_new (GST_TYPE_MPD_SEGMENT_BASE_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentlistnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentlistnode.c index 5d0db76cd6..7de62d8a33 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentlistnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmentlistnode.c @@ -84,7 +84,11 @@ gst_mpd_segment_list_node_init (GstMPDSegmentListNode * self) GstMPDSegmentListNode * gst_mpd_segment_list_node_new (void) { - return g_object_new (GST_TYPE_MPD_SEGMENT_LIST_NODE, NULL); + GstMPDSegmentListNode *ret; + + ret = g_object_new (GST_TYPE_MPD_SEGMENT_LIST_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttemplatenode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttemplatenode.c index 2d3968e88f..f0d8596934 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttemplatenode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttemplatenode.c @@ -175,7 +175,11 @@ gst_mpd_segment_template_node_init (GstMPDSegmentTemplateNode * self) GstMPDSegmentTemplateNode * gst_mpd_segment_template_node_new (void) { - return g_object_new (GST_TYPE_MPD_SEGMENT_TEMPLATE_NODE, NULL); + GstMPDSegmentTemplateNode *ret; + + ret = g_object_new (GST_TYPE_MPD_SEGMENT_TEMPLATE_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttimelinenode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttimelinenode.c index 9b574e6152..97680c3f75 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttimelinenode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenttimelinenode.c @@ -78,7 +78,11 @@ gst_mpd_segment_timeline_node_init (GstMPDSegmentTimelineNode * self) GstMPDSegmentTimelineNode * gst_mpd_segment_timeline_node_new (void) { - return g_object_new (GST_TYPE_MPD_SEGMENT_TIMELINE_NODE, NULL); + GstMPDSegmentTimelineNode *ret; + + ret = g_object_new (GST_TYPE_MPD_SEGMENT_TIMELINE_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenturlnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenturlnode.c index ac13ec482f..fe44036938 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenturlnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsegmenturlnode.c @@ -139,7 +139,11 @@ gst_mpd_segment_url_node_init (GstMPDSegmentURLNode * self) GstMPDSegmentURLNode * gst_mpd_segment_url_node_new (void) { - return g_object_new (GST_TYPE_MPD_SEGMENT_URL_NODE, NULL); + GstMPDSegmentURLNode *ret; + + ret = g_object_new (GST_TYPE_MPD_SEGMENT_URL_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsnode.c index d823d8a02f..a27205603d 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsnode.c @@ -66,7 +66,11 @@ gst_mpd_s_node_init (GstMPDSNode * self) GstMPDSNode * gst_mpd_s_node_new (void) { - return g_object_new (GST_TYPE_MPD_S_NODE, NULL); + GstMPDSNode *ret; + + ret = g_object_new (GST_TYPE_MPD_S_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsubrepresentationnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsubrepresentationnode.c index 66cde3d294..96e12dc992 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsubrepresentationnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsubrepresentationnode.c @@ -98,7 +98,11 @@ gst_mpd_sub_representation_node_init (GstMPDSubRepresentationNode * self) GstMPDSubRepresentationNode * gst_mpd_sub_representation_node_new (void) { - return g_object_new (GST_TYPE_MPD_SUB_REPRESENTATION_NODE, NULL); + GstMPDSubRepresentationNode *ret; + + ret = g_object_new (GST_TYPE_MPD_SUB_REPRESENTATION_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdsubsetnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdsubsetnode.c index d537ed9179..01b9e99431 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdsubsetnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdsubsetnode.c @@ -77,7 +77,11 @@ gst_mpd_subset_node_init (GstMPDSubsetNode * self) GstMPDSubsetNode * gst_mpd_subset_node_new (void) { - return g_object_new (GST_TYPE_MPD_SUBSET_NODE, NULL); + GstMPDSubsetNode *ret; + + ret = g_object_new (GST_TYPE_MPD_SUBSET_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdurltypenode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdurltypenode.c index 5a1ad503f3..d2c679ff0d 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdurltypenode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdurltypenode.c @@ -82,6 +82,7 @@ gst_mpd_url_type_node_new (const gchar * name) { GstMPDURLTypeNode *self = g_object_new (GST_TYPE_MPD_URL_TYPE_NODE, NULL); self->node_name = g_strdup (name); + gst_object_ref_sink (self); return self; } diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdutctimingnode.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdutctimingnode.c index 09bd368e0e..9bc3ca21f1 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdutctimingnode.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdutctimingnode.c @@ -106,7 +106,11 @@ gst_mpd_utctiming_node_init (GstMPDUTCTimingNode * self) GstMPDUTCTimingNode * gst_mpd_utctiming_node_new (void) { - return g_object_new (GST_TYPE_MPD_UTCTIMING_NODE, NULL); + GstMPDUTCTimingNode *ret; + + ret = g_object_new (GST_TYPE_MPD_UTCTIMING_NODE, NULL); + gst_object_ref_sink (ret); + return ret; } void