[gstreamer-bugs] [Bug 597407] GstPipeline calculates base_time incorrectly when a new clock appears during PAUSED state

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Oct 7 06:15:52 PDT 2009


https://bugzilla.gnome.org/show_bug.cgi?id=597407
  GStreamer | gstreamer (core) | 0.10.23

Tommi Myöhänen <ext-tommi.myohanen> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |UNCONFIRMED

--- Comment #3 from Tommi Myöhänen <ext-tommi.myohanen at nokia.com> 2009-10-07 13:15:51 UTC ---
(In reply to comment #2)
> I don't quite know how this would fail, the base time of an element is supposed
> to be a signed int64, so the calculation should work. Maybe there is some
> element that does some weird thing with the signed/unsigned value somewhere.

in GstBaseAudioSrc the base_time is taken to GstClockTime (which is guint64)
variable and the timestamp is then compared to it:

(gstbaseaudiosrc.c:965...):

  } else {
    GstClockTime base_time;

    /* to get the timestamp against the clock we also need to add our offset */
    timestamp = gst_audio_clock_adjust (clock, timestamp);

    /* we are not slaved, subtract base_time */
    base_time = GST_ELEMENT_CAST (src)->base_time;

    if (timestamp > base_time) {
      timestamp -= base_time;
      GST_LOG_OBJECT (src,
          "buffer timestamp %" GST_TIME_FORMAT " (base_time %" GST_TIME_FORMAT
          ")", GST_TIME_ARGS (timestamp), GST_TIME_ARGS (base_time));
    } else {
      GST_LOG_OBJECT (src,
          "buffer timestamp 0, ts %" GST_TIME_FORMAT " <= base_time %"
          GST_TIME_FORMAT, GST_TIME_ARGS (timestamp),
          GST_TIME_ARGS (base_time));
      timestamp = 0;
    }
  }

It also seems that gst_element_(set/get)_base_time function take and return
GstClockTime, even the value is stored in GstClockTimeDiff format. Is this an
accident or done in purpose?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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