]> git.sesse.net Git - vlc/blobdiff - modules/demux/rtpsession.c
The last but not least of this serie of memleaks.
[vlc] / 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. */