NTP timestamps are supposed to match the expected presentation
time, prefering the DTS to compute them was incorrect.
<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>
Section 6.3.1: NTP Timestamps
}
/* NTP timestamp */
- if (GST_BUFFER_DTS_IS_VALID (buf)) {
- time = gst_segment_to_stream_time (&self->segment, GST_FORMAT_TIME,
- GST_BUFFER_DTS (buf));
- } else if (GST_BUFFER_PTS_IS_VALID (buf)) {
+ if (GST_BUFFER_PTS_IS_VALID (buf)) {
time = gst_segment_to_stream_time (&self->segment, GST_FORMAT_TIME,
GST_BUFFER_PTS (buf));
+ } else if (GST_BUFFER_DTS_IS_VALID (buf)) {
+ time = gst_segment_to_stream_time (&self->segment, GST_FORMAT_TIME,
+ GST_BUFFER_DTS (buf));
} else {
GST_INFO_OBJECT (self,
"Buffer doesn't contain any valid DTS or PTS timestamp");