mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
rtponviftimestamp: fix setting of the discontinuity flag
The D bit is meant to be set whenever there is a discontinuity in transmission, and directly maps to the DISCONT flag. The E bit is not meant to be set on every buffer preceding a discontinuity, but only on the last buffer of a contiguous section of recording. This has to be signaled through the unfortunately-named "discont" field of the custom NtpOffset event.
This commit is contained in:
parent
0d5db92953
commit
f65c8fff50
1 changed files with 2 additions and 2 deletions
|
@ -556,7 +556,7 @@ handle_buffer (GstRtpOnvifTimestamp * self, GstBuffer * buf)
|
||||||
field |= (1 << 7);
|
field |= (1 << 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set E if the next buffer has DISCONT */
|
/* Set E if this the last buffer of a contiguous section of recording */
|
||||||
if (self->set_e_bit) {
|
if (self->set_e_bit) {
|
||||||
GST_DEBUG_OBJECT (self, "set E flag");
|
GST_DEBUG_OBJECT (self, "set E flag");
|
||||||
field |= (1 << 6);
|
field |= (1 << 6);
|
||||||
|
@ -564,7 +564,7 @@ handle_buffer (GstRtpOnvifTimestamp * self, GstBuffer * buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set D if the buffer has the DISCONT flag */
|
/* Set D if the buffer has the DISCONT flag */
|
||||||
if (self->set_d_bit) {
|
if (self->set_d_bit || GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) {
|
||||||
GST_DEBUG_OBJECT (self, "set D flag");
|
GST_DEBUG_OBJECT (self, "set D flag");
|
||||||
field |= (1 << 5);
|
field |= (1 << 5);
|
||||||
self->set_d_bit = FALSE;
|
self->set_d_bit = FALSE;
|
||||||
|
|
Loading…
Reference in a new issue