summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-02-29 12:05:55 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-02-29 12:05:55 +0000
commitc483eb548942ec98a3f40267d7f8c85521ea8a9e (patch)
treea77ef2791db97baa6d6ddadd8d1e3835c7577851
parenta7bc4439234b21c2316565b28fc46808ee7b692f (diff)
plugins/elements/: Don't reset GstPollFDs, this is not necessary at all.
Original commit message from CVS: * plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd): * plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd): Don't reset GstPollFDs, this is not necessary at all. * tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST), (delayed_restart), (delayed_control): Use GST_POLL_FD_INIT.
-rw-r--r--ChangeLog10
-rw-r--r--plugins/elements/gstfdsink.c3
-rw-r--r--plugins/elements/gstfdsrc.c3
-rw-r--r--tests/check/gst/gstpoll.c14
4 files changed, 17 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index d22d2e5dbb..35d798dddc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-02-29 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd):
+ * plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
+ Don't reset GstPollFDs, this is not necessary at all.
+
+ * tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
+ (delayed_restart), (delayed_control):
+ Use GST_POLL_FD_INIT.
+
2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstpoll.c: (gst_poll_fd_init):
diff --git a/plugins/elements/gstfdsink.c b/plugins/elements/gstfdsink.c
index 32b7fc746e..9545bd9131 100644
--- a/plugins/elements/gstfdsink.c
+++ b/plugins/elements/gstfdsink.c
@@ -429,9 +429,6 @@ gst_fd_sink_update_fd (GstFdSink * fdsink, int new_fd)
fd.fd = fdsink->fd;
gst_poll_remove_fd (fdsink->fdset, &fd);
- /* Reset the GstPollFD */
- gst_poll_fd_init (&fd);
-
fd.fd = new_fd;
gst_poll_add_fd (fdsink->fdset, &fd);
gst_poll_fd_ctl_write (fdsink->fdset, &fd, TRUE);
diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c
index 6328375612..fed8c63758 100644
--- a/plugins/elements/gstfdsrc.c
+++ b/plugins/elements/gstfdsrc.c
@@ -185,9 +185,6 @@ gst_fd_src_update_fd (GstFdSrc * src)
gst_poll_remove_fd (src->fdset, &fd);
}
- /* Reset the GstPollFD */
- gst_poll_fd_init (&fd);
-
fd.fd = src->new_fd;
gst_poll_add_fd (src->fdset, &fd);
gst_poll_fd_ctl_read (src->fdset, &fd, TRUE);
diff --git a/tests/check/gst/gstpoll.c b/tests/check/gst/gstpoll.c
index 1626b4daf5..204a21f925 100644
--- a/tests/check/gst/gstpoll.c
+++ b/tests/check/gst/gstpoll.c
@@ -34,8 +34,8 @@ static void
test_poll_wait (GstPollMode mode)
{
GstPoll *set;
- GstPollFD rfd = { 0, };
- GstPollFD wfd = { 0, };
+ GstPollFD rfd = GST_POLL_FD_INIT;
+ GstPollFD wfd = GST_POLL_FD_INIT;
gint socks[2];
guchar c = 'A';
@@ -100,7 +100,7 @@ test_poll_wait (GstPollMode mode)
GST_START_TEST (test_poll_basic)
{
GstPoll *set;
- GstPollFD fd = { 0, };
+ GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1;
@@ -180,7 +180,7 @@ static gpointer
delayed_restart (gpointer data)
{
GstPoll *set = data;
- GstPollFD fd = { 0, };
+ GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1;
@@ -198,7 +198,7 @@ delayed_restart (gpointer data)
GST_START_TEST (test_poll_wait_restart)
{
GstPoll *set;
- GstPollFD fd = { 0, };
+ GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1;
@@ -268,7 +268,7 @@ static gpointer
delayed_control (gpointer data)
{
GstPoll *set = data;
- GstPollFD fd = { 0, };
+ GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1;
@@ -294,7 +294,7 @@ delayed_control (gpointer data)
GST_START_TEST (test_poll_controllable)
{
GstPoll *set;
- GstPollFD fd = { 0, };
+ GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1;