Commit c175d930 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: premultiply timeout value to VLC frequency

parent ac9f4d32
......@@ -256,7 +256,8 @@ static int Open (vlc_object_t *obj)
p_sys->rtcp_fd = rtcp_fd;
p_sys->caching = var_CreateGetInteger (obj, "rtp-caching");
p_sys->max_src = var_CreateGetInteger (obj, "rtp-max-src");
p_sys->timeout = var_CreateGetInteger (obj, "rtp-timeout");
p_sys->timeout = var_CreateGetInteger (obj, "rtp-timeout")
* CLOCK_FREQ;
p_sys->max_dropout = var_CreateGetInteger (obj, "rtp-max-dropout");
p_sys->max_misorder = var_CreateGetInteger (obj, "rtp-max-misorder");
p_sys->framed_rtp = (tp == IPPROTO_TCP);
......
......@@ -60,14 +60,14 @@ struct demux_sys_t
vlc_thread_t thread;
vlc_timer_t timer;
vlc_mutex_t lock;
bool thread_ready;
mtime_t timeout;
unsigned caching;
unsigned timeout;
uint16_t max_dropout; /**< Max packet forward misordering */
uint16_t max_misorder; /**< Max packet backward misordering */
uint8_t max_src; /**< Max simultaneous RTP sources */
bool framed_rtp; /**< Framed RTP packets over TCP */
bool thread_ready;
#if 0
bool dead; /**< End of stream */
#endif
......
......@@ -266,7 +266,7 @@ rtp_queue (demux_t *demux, rtp_session_t *session, block_t *block)
}
/* RTP source garbage collection */
if ((tmp->last_rx + (p_sys->timeout * CLOCK_FREQ)) < now)
if ((tmp->last_rx + p_sys->timeout) < now)
{
rtp_source_destroy (demux, session, tmp);
if (--session->srcc > 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment