Commit e09cf2f3 authored by Florin Apostol's avatar Florin Apostol Committed by Thiago Santos
Browse files

dashdemux: corrected next fragment duration validation

Before returning the next fragment duration value, the
gst_mpd_client_get_next_fragment_duration function tries to validate it.
But the condition was incorrect.

https://bugzilla.gnome.org/show_bug.cgi?id=751539
parent f4131291
......@@ -4154,10 +4154,11 @@ gst_mpd_client_get_next_fragment_duration (GstMpdClient * client,
g_return_val_if_fail (stream->cur_seg_template->MultSegBaseType->
SegmentTimeline == NULL, 0);
if (GST_CLOCK_TIME_IS_VALID (duration) || segments_count == 0
|| seg_idx < segments_count)
return duration;
return 0;
if (!GST_CLOCK_TIME_IS_VALID (duration) || (segments_count > 0
&& seg_idx >= segments_count)) {
return 0;
}
return duration;
}
}
......
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