[Bug 765249] New: udpsrc: external socket should not be unreffed upon disposal
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Apr 19 07:58:34 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=765249
Bug ID: 765249
Summary: udpsrc: external socket should not be unreffed upon
disposal
Classification: Platform
Product: GStreamer
Version: 1.8.0
OS: All
Status: NEW
Severity: major
Priority: Normal
Component: gst-plugins-good
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: marcin at saepia.net
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
If udpsrc is used with external socket (passed via socket property), this
socket is unreffed upon element disposal, despite ownership being not
transferred.
Sample code:
public static int main(string[] argv) {
Gst.init(ref argv);
var socket = new Socket(SocketFamily.IPV4, SocketType.DATAGRAM,
SocketProtocol.UDP);
socket.bind(new InetSocketAddress(new InetAddress.any(SocketFamily.IPV4),
0), true);
var pipeline = new Gst.Pipeline("pipeline");
dynamic Gst.Element source = Gst.ElementFactory.make("udpsrc", "source");
source.socket = socket;
dynamic Gst.Element sink = Gst.ElementFactory.make("fakesink", "sink");
pipeline.add(source);
pipeline.add(sink);
source.link(sink);
pipeline.set_state(Gst.State.PLAYING);
pipeline.set_state(Gst.State.NULL);
pipeline.set_state(Gst.State.PLAYING);
return 0;
}
Compile with valac --pkg gstreamer-1.0 --pkg gio-2.0 udpsrc.vala
Produces:
(udpsrc:42922): GLib-GIO-CRITICAL **: g_inet_socket_address_get_address:
assertion 'G_IS_INET_SOCKET_ADDRESS (address)' failed
(udpsrc:42922): GLib-GIO-CRITICAL **: g_inet_address_get_is_multicast:
assertion 'G_IS_INET_ADDRESS (address)' failed
(udpsrc:42922): GLib-GObject-CRITICAL **: g_object_unref: assertion
'G_IS_OBJECT (object)' failed
If the intention was to transfer ownership of socket into element, it is not
documented behaviour.
But IMO it should not behave like this - you may want to ensure that socket is
constantly bound across state changes (e.g. so no other process will intercept
it).
--
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