[Bug 752085] dashdemux: revert changes introduced in fix for bug 751850

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jul 7 10:05:55 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=752085

--- Comment #4 from Florin Apostol <florin.apostol at oregan.net> ---
the new problem is in commit 07d27d906af32c82b0d7460ef63aabf073906df0
mpdparser: Fix off-by-one in has-next-segment calculation

Why did you made that change?

segment_index indicates the next segment. So the function
gst_mpd_client_has_next_segment needs tor return true if segment_index is in
valid array range.

The fact that you added "&& stream->segment_index + 1 >= segments_count" is
wrong.
The definition of segment_index is:
struct _GstActiveStream
{
...
gint segment_index;                         /* index of next sequence chunk */
...
}

So it should not be offset by 1. The code was correct.

It was strange that the developer choose to keep the index of the next segment,
instead of the natural way of keeping the index of the current segment. It
confused me when trying to understand what this index really points to and when
it is valid and when not.

Please revert commit 07d27d906af32c82b0d7460ef63aabf073906df0

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list