GST_SECOND * GST_VIDEO_INFO_FPS_D (&mix->info),
GST_VIDEO_INFO_FPS_N (&mix->info)) + mix->segment.start;
- if (output_start_time >= mix->segment.stop ||
- output_end_time == mix->segment.stop) {
+ if (output_end_time >= mix->segment.stop) {
GST_DEBUG_OBJECT (mix, "Segment done");
GST_VIDEO_MIXER2_UNLOCK (mix);
- gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
- ret = GST_FLOW_EOS;
- goto done_unlocked;
+ if (!(mix->segment.flags & GST_SEGMENT_FLAG_SEGMENT)) {
+ gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
+
+ ret = GST_FLOW_EOS;
+ goto done_unlocked;
+ }
}
if (mix->segment.stop != -1)
seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH,
- GST_SEEK_TYPE_SET, (GstClockTime) 0,
- GST_SEEK_TYPE_SET, (GstClockTime) 1 * GST_SECOND);
+ GST_SEEK_TYPE_SET, (GstClockTime) 0, GST_SEEK_TYPE_SET,
+ (GstClockTime) 2 * GST_SECOND);
main_loop = g_main_loop_new (NULL, FALSE);
g_signal_connect (bus, "message::segment-done",
ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
/* wait for completion */
- state_res = gst_element_get_state (bin, NULL, NULL, GST_CLOCK_TIME_NONE);
+ state_res =
+ gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+ GST_CLOCK_TIME_NONE);
ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
res = gst_element_send_event (bin, seek_event);