[Bug 739544] test and fix tcp (socket) elements

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Nov 6 05:31:41 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=739544
  GStreamer | gst-plugins-base | git

--- Comment #4 from Will Manley <gnome at williammanley.net> 2014-11-06 13:31:36 UTC ---
(In reply to comment #2)
> Review of attachment 289857 [details]:
> 
> ::: gst/tcp/gsttcpserversink.c
> @@ +182,3 @@
>  #endif
> 
> +  g_object_unref (client_socket);
> 
> This seems weird. I would expect the socket reference to be stolen by the base
> class when adding it... and I didn't see where the base class takes an
> additional refernece to the socket either.
> 
> Can you check?

Yes, this was tricky to track down in the first place.  It is passed to the
base-class (gst_multi_handle_sink_add_full[1]) but then passed back again via
the new_client vmethod to gst_multi_socket_sink_new_client where it's
reffed[2].  "transfer-none" seems to be the intention as
gst_multi_handle_sink_add_full checks for duplicates, but doesn't do any
unreffing if it find one[3].

I guess this makes sense as GstMultiHandleSink wouldn't know how to ref and
unref a handle, even if it wanted to.

[1]:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/tcp/gstmultihandlesink.c#n643
[2]:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/tcp/gstmultisocketsink.c
[3]:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/tcp/gstmultihandlesink.c#n712

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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