summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Rafael Giani <dv@pseudoterminal.org>2017-12-07 15:52:39 +0100
committerTim-Philipp Müller <tim@centricular.com>2018-02-11 20:41:14 +0000
commitec963e688f205408db4000efba97ab7c0262059d (patch)
tree1aecc163019f94b9115c329cfc944c5d564429d8
parent8f617854857f261ea28d716e3663f5d84496cba0 (diff)
downloadgstreamer-plugins-bad-ec963e688f205408db4000efba97ab7c0262059d.tar.gz
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
-rw-r--r--gst/inter/gstinteraudiosrc.c3
1 files changed, 2 insertions, 1 deletions
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,