+2004-08-19 Jan Schmidt <thaytan@mad.scientist.com>
+ * gst/udp/gstudpsrc.c: (gst_udpsrc_init), (gst_udpsrc_get):
+ * gst/udp/gstudpsrc.h:
+ Don't call gst_pad_push in a get function. Fixes #150449
+
2004-08-18 Wim Taymans <wim@fluendo.com>
* gst/tcp/gstfdset.c: (gst_fdset_free), (gst_fdset_set_mode),
udpsrc->multi_group = g_strdup (UDP_DEFAULT_MULTICAST_GROUP);
udpsrc->first_buf = TRUE;
+ udpsrc->defer_data = NULL;
}
static GstData *
udpsrc = GST_UDPSRC (GST_OBJECT_PARENT (pad));
+ if (udpsrc->defer_data != NULL) {
+ GstData *outdata = udpsrc->defer_data;
+
+ udpsrc->defer_data = NULL;
+ return outdata;
+ }
+
FD_ZERO (&read_fds);
FD_SET (udpsrc->sock, &read_fds);
if (udpsrc->control != CONTROL_NONE) {
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
current_time, NULL);
- gst_pad_push (udpsrc->srcpad, GST_DATA (discont));
+ udpsrc->defer_data = GST_DATA (discont);
}
udpsrc->first_buf = FALSE;
gst_buffer_unref (outbuf);
outbuf = NULL;
}
-
}
} else {
perror ("select");
outbuf = NULL;
}
+ if (udpsrc->defer_data) {
+ GstData *databuf = udpsrc->defer_data;
+
+ udpsrc->defer_data = GST_DATA (outbuf);
+ return databuf;
+ }
+
+ if (outbuf == NULL)
+ return GST_DATA (gst_event_new (GST_EVENT_EMPTY));
+
return GST_DATA (outbuf);
}