From 7d3d4503a1d33f22dfdfb7402240f0d125b31239 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 12 Apr 2015 13:13:32 +0200 Subject: [PATCH] basesrc: Only set DTS to segment.start on the first buffer if subclass did not provide PTS Otherwise we're going to set a rather arbitrary DTS of segment.start (usually 0) for live sources, which confuses synchronization if the source started capturing at a later time. And it's especially wrong for raw media, for which we should not set any DTS at all. https://bugzilla.gnome.org/show_bug.cgi?id=747731 --- libs/gst/base/gstbasesrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 8b819af..ecb77fb 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -2244,7 +2244,7 @@ gst_base_src_do_sync (GstBaseSrc * basesrc, GstBuffer * buffer) if (!GST_CLOCK_TIME_IS_VALID (dts)) { if (do_timestamp) { dts = running_time; - } else { + } else if (!GST_CLOCK_TIME_IS_VALID (pts)) { if (GST_CLOCK_TIME_IS_VALID (basesrc->segment.start)) { dts = basesrc->segment.start; } else { -- 2.7.4