summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Johansson <joakimj@axis.com>2016-09-13 11:18:27 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-09-19 11:24:47 -0400
commit2837ca997fda8ecc1fee3d1fb1318585e3ad6c38 (patch)
treeea90c552eae7074b671ccca46997211eb0a7d47c
parentb6a85dc45b8486ce70982d9048fb20c17876538f (diff)
downloadgstreamer-plugins-bad-2837ca997fda8ecc1fee3d1fb1318585e3ad6c38.tar.gz
rtponviftimestamp: Change default value of D-bit
The default value of D-bit is changed to TRUE so discontinuity is set for initial request and seek request as well. Only set the e_bit flag for the CUSTOM_DOWNSTREAM event if a cached buffer exists. https://bugzilla.gnome.org/show_bug.cgi?id=770221
-rw-r--r--gst/onvif/gstrtponviftimestamp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/onvif/gstrtponviftimestamp.c b/gst/onvif/gstrtponviftimestamp.c
index 6777f9fc1..a9574837a 100644
--- a/gst/onvif/gstrtponviftimestamp.c
+++ b/gst/onvif/gstrtponviftimestamp.c
@@ -204,7 +204,7 @@ gst_rtp_onvif_timestamp_change_state (GstElement * element,
self->ntp_offset = self->prop_ntp_offset;
GST_DEBUG_OBJECT (self, "ntp-offset: %" GST_TIME_FORMAT,
GST_TIME_ARGS (self->ntp_offset));
- self->set_d_bit = FALSE;
+ self->set_d_bit = TRUE;
self->set_e_bit = FALSE;
break;
default:
@@ -316,7 +316,7 @@ gst_rtp_onvif_timestamp_sink_event (GstPad * pad, GstObject * parent,
/* if the "set-e-bit" property is set, an offset event might mark the
* stream as discontinued. We need to check if the currently cached buffer
* needs the e-bit before it's pushed */
- if (self->prop_set_e_bit &&
+ if (self->buffer != NULL && self->prop_set_e_bit &&
gst_event_has_name (event, GST_NTP_OFFSET_EVENT_NAME)) {
gboolean discont;
if (parse_event_ntp_offset (self, event, NULL, &discont)) {
@@ -345,7 +345,7 @@ gst_rtp_onvif_timestamp_sink_event (GstPad * pad, GstObject * parent,
}
case GST_EVENT_FLUSH_STOP:
purge_cached_buffer_and_events (self);
- self->set_d_bit = FALSE;
+ self->set_d_bit = TRUE;
self->set_e_bit = FALSE;
gst_segment_init (&self->segment, GST_FORMAT_UNDEFINED);
break;