GNOME Bugzilla – Bug 748175
gst_rtsp_server_client_filter hangs
Last modified: 2018-02-01 17:48:03 UTC
When calling gst_rtsp_server_client_filter with a function which always returns GST_RTSP_FILTER_REMOVE and clients are connected to the rtsp will cause random hangs in the application and the function gst_rtsp_server_client_filter will never return. Example code: static GstRTSPFilterResult KickAllFilter (GstRTSPServer *server, GstRTSPClient *client, gpointer user_data) { return GST_RTSP_FILTER_REMOVE; } GList *lst = gst_rtsp_server_client_filter(m_server, KickAllFilter, NULL); g_list_free(lst); Stack Trace:
+ Trace 234985
Thread 7 (Thread 0x7ffff1bfb700 (LWP 28114))
Created attachment 312430 [details] [review] possible fix for gst_rtsp_server_client_filter hang It looks like that GMainContext of GSource can be destroyed prematurely somewhere inside gst_rtsp_watch_unref. Not sure how exactly it happens but this seems to help at least in my case.
Fixed by commit below: commit 17f5785638edd7af241dc028ccb91331498b2cfb Author: Ognyan Tonchev <ognyan@axis.com> Date: Mon Sep 22 13:32:06 2014 +0200 rtsp-client: do not free main context before rtsp watch https://bugzilla.gnome.org/show_bug.cgi?id=737110
Looks like this should be fixed in newer versions of GStreamer. Please re-open if it's still a problem with recent versions, thanks!