gint poll_timeout;
const guint8 *msg = mapinfo->data;
gint payload_size, optlen = 1;
+ gboolean wait_for_connection;
GST_OBJECT_LOCK (srtobject->element);
+ wait_for_connection = srtobject->wait_for_connection;
if (!gst_structure_get_int (srtobject->parameters, "poll-timeout",
&poll_timeout)) {
poll_timeout = GST_SRT_DEFAULT_POLL_TIMEOUT;
break;
}
+ if (!wait_for_connection &&
+ srt_getsockstate (srtobject->sock) == SRTS_CONNECTING) {
+ GST_LOG_OBJECT (srtobject->element,
+ "Not connected yet. Dropping the buffer.");
+ break;
+ }
+
if (srt_epoll_wait (srtobject->poll_id, 0, 0, &wsock,
&wsocklen, poll_timeout, NULL, 0, NULL, 0) < 0) {
continue;