overlay->text_flushing = FALSE;
overlay->text_eos = FALSE;
gst_text_overlay_pop_text (overlay);
+ gst_segment_init (&overlay->text_segment, GST_FORMAT_TIME);
GST_OBJECT_UNLOCK (overlay);
gst_event_unref (event);
ret = TRUE;
GST_INFO_OBJECT (overlay, "video flush stop");
overlay->video_flushing = FALSE;
overlay->video_eos = FALSE;
+ gst_segment_init (&overlay->segment, GST_FORMAT_TIME);
GST_OBJECT_UNLOCK (overlay);
ret = gst_pad_event_default (pad, event);
break;
else
stop = GST_CLOCK_TIME_NONE;
- in_seg = gst_segment_clip (&overlay->segment, GST_FORMAT_TIME,
+ in_seg = gst_segment_clip (&overlay->text_segment, GST_FORMAT_TIME,
GST_BUFFER_TIMESTAMP (buffer), stop, &clip_start, &clip_stop);
} else {
in_seg = TRUE;
}
}
+ if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
+ gst_segment_set_last_stop (&overlay->text_segment, GST_FORMAT_TIME,
+ clip_start);
+
overlay->text_buffer = buffer;
/* That's a new text buffer we need to render */
overlay->need_render = TRUE;
overlay->video_flushing = FALSE;
overlay->video_eos = FALSE;
overlay->text_eos = FALSE;
+ gst_segment_init (&overlay->segment, GST_FORMAT_TIME);
+ gst_segment_init (&overlay->text_segment, GST_FORMAT_TIME);
GST_OBJECT_UNLOCK (overlay);
break;
default: