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
This commit is contained in:
Carlos Rafael Giani 2017-12-07 15:52:39 +01:00 committed by Tim-Philipp Müller
parent 8f61785485
commit ec963e688f

View file

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