mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
dashdemux: mpdparser: properly unref gstdatetime
Avoid leaking the GstDateTime instances when summing dates CID #1212143
This commit is contained in:
parent
288e8d5c0e
commit
16d969b945
1 changed files with 7 additions and 2 deletions
|
@ -3477,11 +3477,16 @@ gst_mpd_client_get_segment_index_at_time (GstMpdClient * client,
|
|||
return -1;
|
||||
|
||||
if (stream_period && stream_period->period) {
|
||||
/* intentionally not unreffing avail_start */
|
||||
avail_start = gst_mpd_client_add_time_difference (avail_start,
|
||||
GstDateTime *t;
|
||||
|
||||
t = gst_mpd_client_add_time_difference (avail_start,
|
||||
stream_period->period->start * 1000);
|
||||
gst_date_time_unref (avail_start);
|
||||
avail_start = t;
|
||||
}
|
||||
diff = gst_mpd_client_calculate_time_difference (avail_start, time);
|
||||
gst_date_time_unref (avail_start);
|
||||
|
||||
if (diff < 0)
|
||||
return -2;
|
||||
if (diff > gst_mpd_client_get_media_presentation_duration (client))
|
||||
|
|
Loading…
Reference in a new issue