From 854683c8718260a29e742dc0fd5a1788875d7a5a Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 25 Jan 2023 10:52:10 +0100 Subject: [PATCH] hlsdemux2: Don't leak PDT datetime Part-of: --- .../ext/adaptivedemux2/hls/gsthlsdemux-stream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c index ca98b2a0e0..fd0441fa29 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c @@ -1057,10 +1057,11 @@ gst_hls_demux_stream_data_received (GstAdaptiveDemux2Stream * stream, } if (!hls_stream->pdt_tag_sent && file != NULL && file->datetime != NULL) { + GstDateTime *pdt_time = gst_date_time_new_from_g_date_time (g_date_time_ref + (file->datetime)); gst_adaptive_demux2_stream_set_tags (stream, - gst_tag_list_new (GST_TAG_DATE_TIME, - gst_date_time_new_from_g_date_time (g_date_time_ref - (file->datetime)), NULL)); + gst_tag_list_new (GST_TAG_DATE_TIME, pdt_time, NULL)); + gst_date_time_unref (pdt_time); hls_stream->pdt_tag_sent = TRUE; }