From 425a85df64f1c1671ea9536f0140a611a1e0d7a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 29 Jun 2008 20:41:33 +0300 Subject: [PATCH] RTP: avoid loosing the first received packet --- modules/demux/rtpsession.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/demux/rtpsession.c b/modules/demux/rtpsession.c index 62c24fdcce..ccad2841a4 100644 --- a/modules/demux/rtpsession.c +++ b/modules/demux/rtpsession.c @@ -268,6 +268,13 @@ rtp_receive (demux_t *demux, rtp_session_t *session, block_t *block) tab[session->srcc++] = src; } + /* Be optimistic for the first packet. Certain codec, such as Vorbis + * do not like loosing the first packet(s), so we cannot just wait + * for proper sequence synchronization. And we don't want to assume that + * the sender starts at seq=0 either. */ + if (src->blocks == NULL) + src->max_seq = seq - p_sys->max_dropout; + /* Check sequence number */ /* NOTE: the sequence number is per-source, * but is independent from the payload type. */ -- 2.39.2