+2008-02-28 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * plugins/elements/gstfdsink.c: (gst_fd_sink_start),
+ (gst_fd_sink_update_fd):
+ * plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
+ * tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
+ (delayed_restart), (delayed_control):
+ Initialize some uninitialized variables as spotted by valgrind.
+
2008-02-28 Wim Taymans <wim.taymans@collabora.co.uk>
* tests/benchmarks/Makefile.am:
gst_fd_sink_start (GstBaseSink * basesink)
{
GstFdSink *fdsink;
- GstPollFD fd;
+ GstPollFD fd = { 0, };
fdsink = GST_FD_SINK (basesink);
if (!gst_fd_sink_check_fd (fdsink, fdsink->fd))
fd.fd = fdsink->fd;
gst_poll_remove_fd (fdsink->fdset, &fd);
+ /* Reset the GstPollFD */
+ memset (&fd, 0, sizeof (GstPollFD));
+
fd.fd = new_fd;
gst_poll_add_fd (fdsink->fdset, &fd);
gst_poll_fd_ctl_write (fdsink->fdset, &fd, TRUE);
/* we need to always update the fdset since it may not have existed when
* gst_fd_src_update_fd() was called earlier */
if (src->fdset != NULL) {
- GstPollFD fd;
+ GstPollFD fd = { 0, };
if (src->fd >= 0) {
fd.fd = src->fd;
gst_poll_remove_fd (src->fdset, &fd);
}
+ /* Reset the GstPollFD */
+ memset (&fd, 0, sizeof (GstPollFD));
+
fd.fd = src->new_fd;
gst_poll_add_fd (src->fdset, &fd);
gst_poll_fd_ctl_read (src->fdset, &fd, TRUE);
test_poll_wait (GstPollMode mode)
{
GstPoll *set;
- GstPollFD rfd;
- GstPollFD wfd;
+ GstPollFD rfd = { 0, };
+ GstPollFD wfd = { 0, };
gint socks[2];
guchar c = 'A';
GST_START_TEST (test_poll_basic)
{
GstPoll *set;
- GstPollFD fd = {.fd = 1 };
+ GstPollFD fd = { 0, };
+
+ fd.fd = 1;
set = gst_poll_new (GST_POLL_MODE_AUTO, FALSE);
fail_if (set == NULL, "Failed to create a GstPoll");
delayed_restart (gpointer data)
{
GstPoll *set = data;
- GstPollFD fd = {.fd = 1 };
+ GstPollFD fd = { 0, };
+
+ fd.fd = 1;
THREAD_START ();
GST_START_TEST (test_poll_wait_restart)
{
GstPoll *set;
- GstPollFD fd = {.fd = 1 };
+ GstPollFD fd = { 0, };
+
+ fd.fd = 1;
set = gst_poll_new (GST_POLL_MODE_AUTO, TRUE);
fail_if (set == NULL, "Failed to create a GstPoll");
delayed_control (gpointer data)
{
GstPoll *set = data;
- GstPollFD fd = {.fd = 1 };
+ GstPollFD fd = { 0, };
+
+ fd.fd = 1;
THREAD_START ();
GST_START_TEST (test_poll_controllable)
{
GstPoll *set;
- GstPollFD fd = {.fd = 1 };
+ GstPollFD fd = { 0, };
+
+ fd.fd = 1;
set = gst_poll_new (GST_POLL_MODE_AUTO, FALSE);
fail_if (set == NULL, "Failed to create a GstPoll");