GNOME Bugzilla – Bug 791347
interaudio: Fix undefined DTS
Last modified: 2018-02-11 20:50:45 UTC
Currently, interaudiosrc does not set the DTS value, only the PTS one. This can cause basesrc to produce incorrect buffer timestamps. This is because basesrc performs this check: if (GST_CLOCK_TIME_IS_VALID (dts)) timestamp = dts; else timestamp = pts; So, if the undefined DTS value happens to be anything other than ((guint64)-1), basesrc ends up using the undefined DTS value instead of the defined PTS one for the outgoing buffers. Fix this by explicitely setting DTS to GST_CLOCK_TIME_NONE.
Created attachment 365199 [details] [review] interaudiosrc DTS patch
Review of attachment 365199 [details] [review]: Interesting, I have always assumed the PTS/DTS were initialized to that automatically, that raises a lot of questions.
Don't see any reason not to push this, just wondering how this might happen in the first place. Does this dts come from the pipeline upstream of interaudiosink? Or does GstAdapter mess up? commit ec963e688f205408db4000efba97ab7c0262059d Author: Carlos Rafael Giani <dv@pseudoterminal.org> Date: Thu Dec 7 15:52:39 2017 +0100 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