[Bug 797289] dispatch write never ends

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 16 08:39:45 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797289

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #373939|none                        |needs-work
             status|                            |

--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 373939:
 --> (https://bugzilla.gnome.org/review?bug=797289&attachment=373939)

::: gst/rtsp-server/rtsp-stream.c
@@ +4350,3 @@
+  g_mutex_unlock (&priv->lock);
+  g_object_unref (stream);
+  return FALSE;

G_SOURCE_REMOVE

@@ +4388,3 @@
+    current_src = g_main_current_source ();
+    if (!current_src)
+      send_tcp_message (stream, idx);

I don't understand this part of the code. Why do you care if there's a current
GSource running on this thread and calling into us? There will be one also in
the case of the idle source above and the message directly being sent without
queue, there will be one if the message was sent from the queue. There might
only be none if we're called directly from the appsink callback or not?

@@ +4390,3 @@
+      send_tcp_message (stream, idx);
+    /* underlaying layer is running this callback */
+    else {

{} for the if above please

@@ +4394,3 @@
+      g_source_set_callback (idle_src, (GSourceFunc) cb_send_tcp_message,
+          g_object_ref (stream), NULL);
+      g_source_attach (idle_src, g_source_get_context (current_src));

g_source_get_context() why? Shouldn't we attach to the main context of the
rtsp-server (from where the connection is used) here?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list