mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtponviftimestamp: prioritize PTS over DTS for NTP timestamp
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
This commit is contained in:
parent
62b240eb4e
commit
f11ce297f4
1 changed files with 4 additions and 4 deletions
|
@ -518,12 +518,12 @@ handle_buffer (GstRtpOnvifTimestamp * self, GstBuffer * buf)
|
|||
}
|
||||
|
||||
/* 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");
|
||||
|
|
Loading…
Reference in a new issue