ximagesrc: clear dts on buffer acquired from pool
authorTim-Philipp Müller <tim@centricular.net>
Thu, 20 Jun 2013 23:42:02 +0000 (00:42 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 20 Jun 2013 23:47:06 +0000 (00:47 +0100)
When setting timestamps on outgoing buffers, clear the
dts explicitly, otherwise it may end up being set to a
bogus value from last time it was used. Avoids every
second or so buffer's dts being set to 0. Not that it
should matter for raw video.

sys/ximage/gstximagesrc.c

index 4d886ae..644768d 100644 (file)
@@ -862,7 +862,8 @@ gst_ximage_src_create (GstPushSrc * bs, GstBuffer ** buf)
     return GST_FLOW_ERROR;
 
   *buf = image;
-  GST_BUFFER_TIMESTAMP (*buf) = next_capture_ts;
+  GST_BUFFER_DTS (*buf) = GST_CLOCK_TIME_NONE;
+  GST_BUFFER_PTS (*buf) = next_capture_ts;
   GST_BUFFER_DURATION (*buf) = dur;
 
   return GST_FLOW_OK;