gboolean new_stream;
gboolean drop_discont;
gboolean is_eos;
+ gboolean seen_data;
gint64 running_time_diff;
} GstStream;
stream->wait = FALSE;
stream->new_stream = FALSE;
stream->drop_discont = FALSE;
+ stream->seen_data = FALSE;
}
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
break;
GstStream *stream;
GList *l;
gboolean all_eos = TRUE;
+ gboolean seen_data;
GSList *pads = NULL;
+ GstPad *srcpad;
GST_STREAM_SYNCHRONIZER_LOCK (self);
stream = gst_pad_get_element_private (pad);
stream->is_eos = TRUE;
}
+ seen_data = stream->seen_data;
+ srcpad = gst_object_ref (stream->srcpad);
+
for (l = self->streams; l; l = l->next) {
GstStream *ostream = l->data;
epad = g_slist_next (epad);
}
g_slist_free (pads);
+ } else {
+ /* if EOS, but no data has passed, then send something to replace EOS
+ * for preroll purposes */
+ if (!seen_data) {
+ GstBuffer *buf = gst_buffer_new ();
+
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_PREROLL);
+ gst_pad_push (srcpad, buf);
+ }
}
+ gst_object_unref (srcpad);
goto done;
break;
}
GST_STREAM_SYNCHRONIZER_LOCK (self);
stream = gst_pad_get_element_private (pad);
+ stream->seen_data = TRUE;
if (stream && stream->drop_discont) {
buffer = gst_buffer_make_metadata_writable (buffer);
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);