adaptivedemux2: Don't leak taglist

Clarify the ownership in the documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
Edward Hervey 2023-01-25 10:08:50 +01:00 committed by GStreamer Marge Bot
parent 123030feac
commit 96613c45fb
3 changed files with 7 additions and 6 deletions

View file

@ -879,6 +879,9 @@ gst_dash_demux_setup_all_streams (GstDashDemux2 * demux)
GST_ADAPTIVE_DEMUX2_STREAM_CAST (stream)->stream_type = streamtype; GST_ADAPTIVE_DEMUX2_STREAM_CAST (stream)->stream_type = streamtype;
g_free (stream_id); g_free (stream_id);
if (tags)
gst_adaptive_demux2_stream_set_tags (GST_ADAPTIVE_DEMUX2_STREAM_CAST
(stream), gst_tag_list_ref (tags));
gst_adaptive_demux2_add_stream (GST_ADAPTIVE_DEMUX_CAST (demux), gst_adaptive_demux2_add_stream (GST_ADAPTIVE_DEMUX_CAST (demux),
GST_ADAPTIVE_DEMUX2_STREAM_CAST (stream)); GST_ADAPTIVE_DEMUX2_STREAM_CAST (stream));
@ -901,9 +904,6 @@ gst_dash_demux_setup_all_streams (GstDashDemux2 * demux)
|| gst_structure_has_name (s, "audio/x-m4a"); || gst_structure_has_name (s, "audio/x-m4a");
gst_adaptive_demux2_stream_set_caps (GST_ADAPTIVE_DEMUX2_STREAM_CAST gst_adaptive_demux2_stream_set_caps (GST_ADAPTIVE_DEMUX2_STREAM_CAST
(stream), caps); (stream), caps);
if (tags)
gst_adaptive_demux2_stream_set_tags (GST_ADAPTIVE_DEMUX2_STREAM_CAST
(stream), tags);
stream->index = i; stream->index = i;
if (active_stream->cur_adapt_set && if (active_stream->cur_adapt_set &&

View file

@ -2896,6 +2896,7 @@ gst_adaptive_demux2_stream_set_caps (GstAdaptiveDemux2Stream * stream,
} }
/* must be called with manifest_lock taken */ /* must be called with manifest_lock taken */
/* @tags: transfer full */
void void
gst_adaptive_demux2_stream_set_tags (GstAdaptiveDemux2Stream * stream, gst_adaptive_demux2_stream_set_tags (GstAdaptiveDemux2Stream * stream,
GstTagList * tags) GstTagList * tags)

View file

@ -431,6 +431,9 @@ gst_mss_demux_setup_streams (GstAdaptiveDemux * demux)
if (lang != NULL) if (lang != NULL)
tags = gst_tag_list_new (GST_TAG_LANGUAGE_CODE, lang, NULL); tags = gst_tag_list_new (GST_TAG_LANGUAGE_CODE, lang, NULL);
if (tags)
gst_adaptive_demux2_stream_set_tags (stream, gst_tag_list_ref (tags));
track = gst_adaptive_demux_track_new (demux, stream_type, track = gst_adaptive_demux_track_new (demux, stream_type,
GST_STREAM_FLAG_NONE, (gchar *) stream_id, create_mss_caps (mss_stream, GST_STREAM_FLAG_NONE, (gchar *) stream_id, create_mss_caps (mss_stream,
caps), tags); caps), tags);
@ -443,9 +446,6 @@ gst_mss_demux_setup_streams (GstAdaptiveDemux * demux)
GST_DEBUG_OBJECT (stream, "Current quality bitrate %" G_GUINT64_FORMAT, GST_DEBUG_OBJECT (stream, "Current quality bitrate %" G_GUINT64_FORMAT,
gst_mss_stream_get_current_bitrate (manifeststream)); gst_mss_stream_get_current_bitrate (manifeststream));
if (tags)
gst_adaptive_demux2_stream_set_tags (stream, tags);
active_streams = g_slist_prepend (active_streams, mss_stream); active_streams = g_slist_prepend (active_streams, mss_stream);
} }