mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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:
parent
1fc572d740
commit
89ad2de93e
1 changed files with 4 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue