[Bug 751539] New: dashdemux: wrong duration validation in gst_mpd_client_get_next_fragment_duration

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jun 26 04:58:44 PDT 2015


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

            Bug ID: 751539
           Summary: dashdemux: wrong duration validation in
                    gst_mpd_client_get_next_fragment_duration
    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: ---

Before returning the duration value, the
gst_mpd_client_get_next_fragment_duration function tries to validate it. The
condition is:

    if (GST_CLOCK_TIME_IS_VALID (duration) || segments_count == 0
        || seg_idx < segments_count)
      return duration;
    return 0;

But it should be:
    if (GST_CLOCK_TIME_IS_VALID (duration) && (segments_count == 0
        || seg_idx < segments_count))
      return duration;
    return 0;

Even better, we could write the code similar to
gst_mpd_client_get_next_fragment or gst_mpd_client_get_next_fragment_timestamp
functions:

    if (!GST_CLOCK_TIME_IS_VALID (duration) || (segments_count > 0
            && stream->segment_index >= segments_count)) {
      return 0;
    }
    return 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