[Bug 751792] New: dashdemux: incorrect segment duration for a segment list

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jul 1 09:49:07 PDT 2015


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

            Bug ID: 751792
           Summary: dashdemux: incorrect segment duration for a segment
                    list
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: florin.apostol at oregan.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

If a segment list contains multiple segments, the
gst_mpd_client_setup_representation function will try to limit the duration of
the last segment so that it ends on the period end:

  if (last_media_segment && GST_CLOCK_TIME_IS_VALID (PeriodEnd)) {
    if (last_media_segment->start + last_media_segment->duration > PeriodEnd) {
      last_media_segment->duration = PeriodEnd - last_media_segment->start;
      GST_LOG ("Fixed duration of last segment: %" GST_TIME_FORMAT,
          GST_TIME_ARGS (last_media_segment->duration));
    }
    GST_LOG ("Built a list of %d segments", last_media_segment->number);
  }


The problem is that the limitation is attempted only for the last segment.
More, if the period end is before the last segment start, the last segment will
get an overflowed duration.

For example, consider a list of 2 segments, each of 25s duration, but a period
of only 20 seconds. The first segment will end up with a duration of 25 and the
second with a duration of 18446744068709551616.

I don't know what should be the correct approach if period duration is much
smaller than the sum of segments. I propose that the
gst_mpd_client_setup_representation function to check each segment before it is
being added to the stream list (by gst_mpd_client_add_media_segment function).
If the segment would end after period's end, we reduce the segment duration and
we refuse to add any more segments to the stream (so that period duration is
trusted more than the segment list). For the above example, we end up with a
single segment of 20s duration.

-- 
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