From ec963e688f205408db4000efba97ab7c0262059d Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Thu, 7 Dec 2017 15:52:39 +0100 Subject: interaudio: Make sure both PTS and DTS values are defined The inter plugin originated in 0.10, which had only one timestamp. As a result, during the port to 1.0, the DTS were left undefined. This can cause subtle bugs with basesrc, which can end up incorrectly picking DTS over PTS and producing output buffers with incorrect timestamps. https://bugzilla.gnome.org/show_bug.cgi?id=791347 --- gst/inter/gstinteraudiosrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c index 886632e26..8a15f072f 100644 --- a/gst/inter/gstinteraudiosrc.c +++ b/gst/inter/gstinteraudiosrc.c @@ -412,7 +412,8 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size, GST_BUFFER_OFFSET (buffer) = interaudiosrc->n_samples; GST_BUFFER_OFFSET_END (buffer) = interaudiosrc->n_samples + n; - GST_BUFFER_TIMESTAMP (buffer) = interaudiosrc->timestamp_offset + + GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE; + GST_BUFFER_PTS (buffer) = interaudiosrc->timestamp_offset + gst_util_uint64_scale (interaudiosrc->n_samples, GST_SECOND, interaudiosrc->info.rate); GST_DEBUG_OBJECT (interaudiosrc, "create ts %" GST_TIME_FORMAT, -- cgit v1.2.3