gboolean flushing;
gboolean seen_buffer;
+ gboolean is_sparse;
GstClockTime max_ts;
GstSegment segment;
goto drop_event;
switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_STREAM_START:{
+ GstStreamFlags flags;
+ gst_event_parse_stream_flags (event, &flags);
+ part_pad->is_sparse = (flags & GST_STREAM_FLAG_SPARSE);
+ break;
+ }
case GST_EVENT_SEGMENT:{
GstSegment *seg = &part_pad->segment;
GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP)
goto drop_event;
- if (!block_until_can_push (reader)) {
- SPLITMUX_PART_UNLOCK (reader);
- gst_object_unref (target);
- gst_event_unref (event);
- return FALSE;
- }
+ if (!block_until_can_push (reader))
+ goto drop_event;
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_GAP:{
SPLITMUX_PART_LOCK (reader);
for (cur = g_list_first (reader->pads); cur != NULL; cur = g_list_next (cur)) {
GstSplitMuxPartPad *part_pad = SPLITMUX_PART_PAD_CAST (cur->data);
- if (part_pad->max_ts < ret)
+ if (!part_pad->is_sparse && part_pad->max_ts < ret)
ret = part_pad->max_ts;
}
/* Make sure to set the state to failed and wake up the listener
* on error */
SPLITMUX_PART_LOCK (reader);
+ GST_ERROR_OBJECT (reader, "Got error message from child %" GST_PTR_FORMAT
+ " marking this reader as failed", GST_MESSAGE_SRC (message));
reader->prep_state = PART_STATE_FAILED;
SPLITMUX_PART_BROADCAST (reader);
SPLITMUX_PART_UNLOCK (reader);