From 82fe23f212142c9d66fcaa010d4c3f163819e58e Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Sat, 11 Jul 2020 15:21:33 -0400 Subject: [PATCH] rtpsink: Fix error handling on bad DNS This will properly print the DNS being attempted to resolved and avoid trying to unref a NULL pointer. Part-of: --- gst/rtp/gstrtpsink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gst/rtp/gstrtpsink.c b/gst/rtp/gstrtpsink.c index 49e357b945..364b6884cc 100644 --- a/gst/rtp/gstrtpsink.c +++ b/gst/rtp/gstrtpsink.c @@ -506,10 +506,8 @@ gst_rtp_sink_start (GstRtpSink * self) dns_resolve_failed: GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, - ("Could not resolve hostname '%s'", GST_STR_NULL (remote_addr)), + ("Could not resolve hostname '%s'", gst_uri_get_host (self->uri)), ("DNS resolver reported: %s", error->message)); - g_free (remote_addr); - g_object_unref (iaddr); g_error_free (error); return FALSE; }