From: RĂ©mi Denis-Courmont Date: Sun, 28 Mar 2010 17:01:27 +0000 (+0300) Subject: RTP: premultiply timeout value to VLC frequency X-Git-Tag: 1.1.0-pre1~278 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c175d9308b5be3a12e1c32a8838fee043438ab98;hp=ac9f4d32b7f9c1323fa6dd5a85582fb6c7ce97f9;p=vlc RTP: premultiply timeout value to VLC frequency --- diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c index d29e26f7b8..19ed2693bc 100644 --- a/modules/access/rtp/rtp.c +++ b/modules/access/rtp/rtp.c @@ -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); diff --git a/modules/access/rtp/rtp.h b/modules/access/rtp/rtp.h index bb5b9f31e6..c90b01080a 100644 --- a/modules/access/rtp/rtp.h +++ b/modules/access/rtp/rtp.h @@ -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 diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c index d37be18795..c86aa08c49 100644 --- a/modules/access/rtp/session.c +++ b/modules/access/rtp/session.c @@ -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)