]> git.sesse.net Git - vlc/commitdiff
RTP: avoid loosing the first received packet
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 29 Jun 2008 17:41:33 +0000 (20:41 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 29 Jun 2008 17:42:09 +0000 (20:42 +0300)
modules/demux/rtpsession.c

index 62c24fdcce279332b1b9555f466939f80bc4767a..ccad2841a4a1cf045daea351b631f628a2cb36cb 100644 (file)
@@ -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. */