diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-09-24 16:27:04 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-09-24 16:27:04 +0200 |
commit | f73db06c09ae3480b3d76a2bba8700444d00f181 (patch) | |
tree | e0dc8f97f8680a721eccf022a9559f1398961bce /plugins | |
parent | e9c66bffc089df63904377cb88002300086e6440 (diff) |
Imported Upstream version 1.0.0upstream/1.0.0
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstidentity.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index 8361a7a..be93b86 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -310,6 +310,20 @@ gst_identity_sink_event (GstBaseTransform * trans, GstEvent * event) } } + /* also transform GAP timestamp similar to buffer timestamps */ + if (identity->single_segment && (GST_EVENT_TYPE (event) == GST_EVENT_GAP) && + trans->have_segment && trans->segment.format == GST_FORMAT_TIME) { + GstClockTime start, dur; + + gst_event_parse_gap (event, &start, &dur); + if (GST_CLOCK_TIME_IS_VALID (start)) { + start = gst_segment_to_running_time (&trans->segment, + GST_FORMAT_TIME, start); + gst_event_unref (event); + event = gst_event_new_gap (start, dur); + } + } + /* Reset previous timestamp, duration and offsets on NEWSEGMENT * to prevent false warnings when checking for perfect streams */ if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) { |