plugins/elements/gstidentity.c: Fix imperfect timestamp/offset checks when we get another NEWSEGMENT event after proc...

Original commit message from CVS:
* plugins/elements/gstidentity.c: (gst_identity_event),
(gst_identity_start):
Fix imperfect timestamp/offset checks when we get another NEWSEGMENT
event after processing some data. Fixes bug #526042.
This commit is contained in:
Sebastian Dröge 2008-04-09 08:19:36 +00:00
parent 7293b3e7d7
commit 64bf111c92
2 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2008-04-09 Sebastian Dröge <slomo@circular-chaos.org>
* plugins/elements/gstidentity.c: (gst_identity_event),
(gst_identity_start):
Fix imperfect timestamp/offset checks when we get another NEWSEGMENT
event after processing some data. Fixes bug #526042.
2008-04-08 Wim Taymans <wim.taymans@collabora.co.uk>
* docs/gst/gstreamer-sections.txt:

View file

@ -341,6 +341,13 @@ gst_identity_event (GstBaseTransform * trans, GstEvent * event)
}
}
/* Reset previous timestamp, duration and offsets on NEWSEGMENT
* to prevent false warnings when checking for perfect streams */
if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
identity->prev_timestamp = identity->prev_duration = GST_CLOCK_TIME_NONE;
identity->prev_offset = identity->prev_offset_end = GST_BUFFER_OFFSET_NONE;
}
GST_BASE_TRANSFORM_CLASS (parent_class)->event (trans, event);
if (identity->single_segment
@ -762,8 +769,8 @@ gst_identity_start (GstBaseTransform * trans)
identity->offset = 0;
identity->prev_timestamp = GST_CLOCK_TIME_NONE;
identity->prev_duration = GST_CLOCK_TIME_NONE;
identity->prev_offset_end = -1;
identity->prev_offset = -1;
identity->prev_offset_end = GST_BUFFER_OFFSET_NONE;
identity->prev_offset = GST_BUFFER_OFFSET_NONE;
return TRUE;
}