From 2d3dccdba7d3f15b3b1c227a502e49f5d6c83a90 Mon Sep 17 00:00:00 2001 From: Stefano Buora Date: Thu, 20 Feb 2020 09:06:10 +0100 Subject: [PATCH] rtspsrc: remove useless function calls 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 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index a0c58c926d..f2ca49e595 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -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