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
This commit is contained in:
Petr Kulhavy 2016-11-14 12:13:14 +01:00 committed by Sebastian Dröge
parent 1fc572d740
commit 89ad2de93e

View file

@ -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;
}
}