rtspsrc: remove useless function calls
authorStefano Buora <sbuora@marchnetworks.com>
Thu, 20 Feb 2020 08:06:10 +0000 (09:06 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 20 Feb 2020 08:27:35 +0000 (08:27 +0000)
Comparing gst_rtspsrc_loop_interleaved and gst_rtspsrc_loop_udp, and investigating on timeout issues, it sounds like a piece of code has been originally copied from udp to the interleaved one. The timeout variable is never used inside the interleaved one. No side effect has been seen in the removed function calls.

The debug message removed is pointless as the timeout used is "src->tcp_timeout" that is fixed.

The presence of the two timeout drove my team in investigating if the reference to the tcp_timeout was correct (it is). Hence we removed the misleading reference to the local timeout variable.

gst/rtsp/gstrtspsrc.c

index a0c58c9..f2ca49e 100644 (file)
@@ -5557,16 +5557,8 @@ gst_rtspsrc_loop_interleaved (GstRTSPSrc * src)
   GstRTSPMessage message = { 0 };
   GstRTSPResult res;
   GstFlowReturn ret = GST_FLOW_OK;
-  gint64 timeout;
 
   while (TRUE) {
-    /* get the next timeout interval */
-    timeout = gst_rtsp_connection_next_timeout_usec (src->conninfo.connection);
-
-    GST_DEBUG_OBJECT (src, "doing receive with timeout %" G_GINT64_FORMAT
-        " seconds, %" G_GINT64_FORMAT " usec", timeout / G_USEC_PER_SEC,
-        timeout % G_USEC_PER_SEC);
-
     gst_rtsp_message_unset (&message);
 
     /* protect the connection with the connection lock so that we can see when