adaptivedemux: Use gst_clear_tag_list_where applicable

Clearer and ensures fields are reset

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3443>
This commit is contained in:
Edward Hervey 2022-11-21 17:23:10 +01:00 committed by GStreamer Marge Bot
parent 948bc4291c
commit e36b1ae6ed
2 changed files with 2 additions and 4 deletions

View file

@ -135,7 +135,7 @@ gst_adaptive_demux2_stream_finalize (GObject * object)
if (stream->pending_caps)
gst_caps_unref (stream->pending_caps);
g_clear_pointer (&stream->pending_tags, gst_tag_list_unref);
gst_clear_tag_list (&stream->pending_tags);
g_clear_pointer (&stream->stream_collection, gst_object_unref);
G_OBJECT_CLASS (parent_class)->finalize (object);

View file

@ -2833,9 +2833,7 @@ gst_adaptive_demux2_stream_set_tags (GstAdaptiveDemux2Stream * stream,
{
GST_DEBUG_OBJECT (stream,
"setting new tags for stream %" GST_PTR_FORMAT, tags);
if (stream->pending_tags) {
gst_tag_list_unref (stream->pending_tags);
}
gst_clear_tag_list (&stream->pending_tags);
stream->pending_tags = tags;
}