[Bug 698748] mpegtsmux: improper timestamping of output packets

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Apr 24 08:14:49 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=698748
  GStreamer | gst-plugins-bad | 1.x

--- Comment #1 from Greg Rutz <greg at gsr-tek.com> 2013-04-24 15:14:46 UTC ---
In mpegtsmux_clip_inc_running_time(), the last dts and pts of incoming packets
are saved to the MpegTsPadData.  In the case of my test stream, the first
buffer to come through the video sink pad always have DTS = PTS = 0.  This sets
pad_data->last_dts = pad_data->last_pts = 0.

After that first video buffer, all subsequent buffers only have valid DTS. 
Finally, in mpegtsmux_collected_buffer, the timestamping of the outgoing buffer
is applied by this code:

  /* outgoing ts follows ts of PCR program stream */
  if (prog->pcr_stream == best->stream) {
    /* prefer DTS if present for PCR as it should be monotone */
    mux->last_ts =
        GST_CLOCK_TIME_IS_VALID (best->last_dts) ? best->last_dts : best->
        last_pts;
  }

Since DTS is preferred and since the last dts is valid (its 0, not -1), every
buffer gets timestamped with the value 0.

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