aboutsummaryrefslogtreecommitdiff
path: root/plugins/elements/gstidentity.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elements/gstidentity.c')
-rw-r--r--plugins/elements/gstidentity.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c
index be93b86..2475cc8 100644
--- a/plugins/elements/gstidentity.c
+++ b/plugins/elements/gstidentity.c
@@ -307,6 +307,9 @@ gst_identity_sink_event (GstBaseTransform * trans, GstEvent * event)
news = gst_event_new_segment (&segment);
gst_pad_event_default (trans->sinkpad, GST_OBJECT_CAST (trans), news);
+ } else {
+ /* need to track segment for proper running time */
+ gst_event_copy_segment (event, &trans->segment);
}
}
@@ -551,7 +554,7 @@ gst_identity_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
GstClockTime time = gst_util_uint64_scale_int (identity->offset,
GST_SECOND, identity->datarate);
- GST_BUFFER_TIMESTAMP (buf) = time;
+ GST_BUFFER_PTS (buf) = GST_BUFFER_DTS (buf) = time;
GST_BUFFER_DURATION (buf) = size * GST_SECOND / identity->datarate;
}
@@ -596,7 +599,7 @@ gst_identity_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
if (identity->single_segment && (trans->segment.format == GST_FORMAT_TIME)
&& (ret == GST_FLOW_OK)) {
- GST_BUFFER_TIMESTAMP (buf) = runtimestamp;
+ GST_BUFFER_PTS (buf) = GST_BUFFER_DTS (buf) = runtimestamp;
GST_BUFFER_OFFSET (buf) = GST_CLOCK_TIME_NONE;
GST_BUFFER_OFFSET_END (buf) = GST_CLOCK_TIME_NONE;
}