Commit 16d969b9 authored by Thiago Santos's avatar Thiago Santos

dashdemux: mpdparser: properly unref gstdatetime

Avoid leaking the GstDateTime instances when summing dates

CID #1212143
parent 288e8d5c
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment