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
This commit is contained in:
Florin Apostol 2015-06-26 13:09:54 +01:00 committed by Thiago Santos
parent f413129172
commit e09cf2f3b6

View file

@ -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;
}
}