From 17ea0308cfe73ee804cae0bc05934852c56a4f28 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 24 Jan 2012 17:42:51 +0000 Subject: [PATCH] subparse: fix parsing by not misusing non time segments A simple filesrc ! subparse ! fakesink type pipeline now works again. --- gst/subparse/gstsubparse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index 55f5f194c4..cd8b8e0277 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -1582,7 +1582,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) } case GST_EVENT_SEGMENT: { - gst_event_copy_segment (event, &self->segment); + const GstSegment *s; + gst_event_parse_segment (event, &s); + if (s->format == GST_FORMAT_TIME) + gst_event_copy_segment (event, &self->segment); GST_DEBUG_OBJECT (self, "newsegment (%s)", gst_format_get_name (self->segment.format));