mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
multihandlesink: fix one bug in multisocketsink refactoring
This commit is contained in:
parent
c024274261
commit
d21c42a709
3 changed files with 11 additions and 11 deletions
|
@ -855,6 +855,8 @@ restart:
|
||||||
next = g_list_next (clients);
|
next = g_list_next (clients);
|
||||||
|
|
||||||
mhclient->status = GST_CLIENT_STATUS_REMOVED;
|
mhclient->status = GST_CLIENT_STATUS_REMOVED;
|
||||||
|
/* the next call changes the list, which is why we iterate
|
||||||
|
* with a temporary next pointer */
|
||||||
gst_multi_fd_sink_remove_client_link (sink, clients);
|
gst_multi_fd_sink_remove_client_link (sink, clients);
|
||||||
}
|
}
|
||||||
gst_poll_restart (sink->fdset);
|
gst_poll_restart (sink->fdset);
|
||||||
|
|
|
@ -782,7 +782,7 @@ done:
|
||||||
void
|
void
|
||||||
gst_multi_socket_sink_clear (GstMultiHandleSink * mhsink)
|
gst_multi_socket_sink_clear (GstMultiHandleSink * mhsink)
|
||||||
{
|
{
|
||||||
GList *clients;
|
GList *clients, *next;
|
||||||
guint32 cookie;
|
guint32 cookie;
|
||||||
GstMultiSocketSink *sink = GST_MULTI_SOCKET_SINK (mhsink);
|
GstMultiSocketSink *sink = GST_MULTI_SOCKET_SINK (mhsink);
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ gst_multi_socket_sink_clear (GstMultiHandleSink * mhsink)
|
||||||
CLIENTS_LOCK (sink);
|
CLIENTS_LOCK (sink);
|
||||||
restart:
|
restart:
|
||||||
cookie = sink->clients_cookie;
|
cookie = sink->clients_cookie;
|
||||||
for (clients = sink->clients; clients; clients = clients->next) {
|
for (clients = sink->clients; clients; clients = next) {
|
||||||
GstMultiHandleClient *mhclient;
|
GstMultiHandleClient *mhclient;
|
||||||
|
|
||||||
if (cookie != sink->clients_cookie) {
|
if (cookie != sink->clients_cookie) {
|
||||||
|
@ -800,7 +800,11 @@ restart:
|
||||||
}
|
}
|
||||||
|
|
||||||
mhclient = (GstMultiHandleClient *) clients->data;
|
mhclient = (GstMultiHandleClient *) clients->data;
|
||||||
|
next = g_list_next (clients);
|
||||||
|
|
||||||
mhclient->status = GST_CLIENT_STATUS_REMOVED;
|
mhclient->status = GST_CLIENT_STATUS_REMOVED;
|
||||||
|
/* the next call changes the list, which is why we iterate
|
||||||
|
* with a temporary next pointer */
|
||||||
gst_multi_socket_sink_remove_client_link (sink, clients);
|
gst_multi_socket_sink_remove_client_link (sink, clients);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -587,9 +587,7 @@ GST_START_TEST (test_burst_client_bytes)
|
||||||
ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
|
ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
|
||||||
cleanup_multisocketsink (sink);
|
cleanup_multisocketsink (sink);
|
||||||
|
|
||||||
// FIXME for slomo: the refcount is now 3 instead of 1 ?
|
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
|
||||||
// ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
|
|
||||||
ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
|
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,9 +688,7 @@ GST_START_TEST (test_burst_client_bytes_keyframe)
|
||||||
ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
|
ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
|
||||||
cleanup_multisocketsink (sink);
|
cleanup_multisocketsink (sink);
|
||||||
|
|
||||||
// FIXME for slomo: the refcount is now 3 instead of 1 ?
|
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
|
||||||
// ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
|
|
||||||
ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
|
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -798,9 +794,7 @@ GST_START_TEST (test_burst_client_bytes_with_keyframe)
|
||||||
ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
|
ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
|
||||||
cleanup_multisocketsink (sink);
|
cleanup_multisocketsink (sink);
|
||||||
|
|
||||||
// FIXME for slomo: the refcount is now 3 instead of 1 ?
|
ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
|
||||||
// ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
|
|
||||||
ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
|
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue