Commit 89ad2de9 authored by Petr Kulhavy's avatar Petr Kulhavy Committed by Sebastian Dröge

udpsrc: remove redundant saddr unref

The g_object_unref (saddr) before receiving message seems to be redundant as it
is done just before jumping to retry

Though not directly related, part of
https://bugzilla.gnome.org/show_bug.cgi?id=772841
parent 1fc572d7
......@@ -864,6 +864,10 @@ gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
p_saddr = (udpsrc->retrieve_sender_address) ? &saddr : NULL;
retry:
if (saddr != NULL) {
g_object_unref (saddr);
saddr = NULL;
}
do {
gint64 timeout;
......@@ -897,11 +901,6 @@ retry:
}
} while (G_UNLIKELY (try_again));
if (saddr != NULL) {
g_object_unref (saddr);
saddr = NULL;
}
res =
g_socket_receive_message (udpsrc->used_socket, p_saddr, udpsrc->vec, 2,
p_msgs, &n_msgs, &flags, udpsrc->cancellable, &err);
......@@ -973,12 +972,6 @@ retry:
if (skip_packet) {
GST_DEBUG_OBJECT (udpsrc,
"Dropping packet for a different multicast address");
if (saddr != NULL) {
g_object_unref (saddr);
saddr = NULL;
}
goto retry;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment