[vlc-commits] commit: RTP: premultiply timeout value to VLC frequency ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Sun Mar 28 19:45:56 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 28 20:01:27 2010 +0300| [c175d9308b5be3a12e1c32a8838fee043438ab98] | committer: Rémi Denis-Courmont
RTP: premultiply timeout value to VLC frequency
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c175d9308b5be3a12e1c32a8838fee043438ab98
---
modules/access/rtp/rtp.c | 3 ++-
modules/access/rtp/rtp.h | 4 ++--
modules/access/rtp/session.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c
index d29e26f..19ed269 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 bb5b9f3..c90b010 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 d37be18..c86aa08 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)
More information about the vlc-commits
mailing list