/* a new segment arrived */
gboolean new_segment;
+ GstSegment segment;
/* the parsed frame size */
guint16 width, height;
("Can't set caps to the src pad"), ("Can't set caps to the src pad"));
return GST_FLOW_ERROR;
}
+ gst_pad_push_event (parse->priv->srcpad,
+ gst_event_new_segment (&parse->priv->segment));
if (parse->priv->tags) {
GST_DEBUG_OBJECT (parse, "Pushing tags: %" GST_PTR_FORMAT,
/* Discard any data in the adapter. There should have been an EOS before
* to flush it. */
gst_adapter_clear (parse->priv->adapter);
- res = gst_pad_push_event (parse->priv->srcpad, event);
+ gst_event_copy_segment (event, &parse->priv->segment);
+ gst_event_unref (event);
parse->priv->new_segment = TRUE;
break;
case GST_EVENT_TAG:{
parse->priv->caps_width = parse->priv->caps_height = -1;
parse->priv->new_segment = FALSE;
+ gst_segment_init (&parse->priv->segment, GST_FORMAT_UNDEFINED);
parse->priv->next_ts = GST_CLOCK_TIME_NONE;
parse->priv->duration = GST_CLOCK_TIME_NONE;