summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2015-01-14 10:52:11 +0000
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2015-01-14 10:52:40 +0000
commit0bd45dc4014d9fd89c3535dc692efab20e9c5644 (patch)
treee259dc4ead9fef699bf7f7d7ebb6c10d83a932a0
parentaefb6fda5ecda59340080969c50561bc60a930cc (diff)
identity: send gap events when dropping buffers
-rw-r--r--plugins/elements/gstidentity.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c
index f31599f5b..8f564cf2a 100644
--- a/plugins/elements/gstidentity.c
+++ b/plugins/elements/gstidentity.c
@@ -503,6 +503,7 @@ gst_identity_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
GstFlowReturn ret = GST_FLOW_OK;
GstIdentity *identity = GST_IDENTITY (trans);
GstClockTime runtimestamp = G_GINT64_CONSTANT (0);
+ GstClockTime ts, duration;
gsize size;
size = gst_buffer_get_size (buf);
@@ -610,6 +611,14 @@ dropped:
gst_identity_update_last_message_for_buffer (identity, "dropping", buf,
size);
}
+
+ ts = GST_BUFFER_TIMESTAMP (buf);
+ if (GST_CLOCK_TIME_IS_VALID (ts)) {
+ duration = GST_BUFFER_DURATION (buf);
+ gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (identity),
+ gst_event_new_gap (ts, duration));
+ }
+
/* return DROPPED to basetransform. */
return GST_BASE_TRANSFORM_FLOW_DROPPED;
}