From e09cf2f3b6106d3aa9e7b8b6ab72b09cce3d45c5 Mon Sep 17 00:00:00 2001 From: Florin Apostol Date: Fri, 26 Jun 2015 13:09:54 +0100 Subject: [PATCH] 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 --- ext/dash/gstmpdparser.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index e7420ec..03fd66c 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -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; } } -- 2.7.4