source->ssrc = ssrc;
source->jitter = 0;
source->ref_rtp = 0;
- /* TODO: use 0, but VLC does not like negative PTS at the moment */
+ /* TODO: use VLC_TS_0, but VLC does not like negative PTS at the moment */
source->ref_ntp = UINT64_C (1) << 62;
source->max_seq = source->bad_seq = init_seq;
source->last_seq = init_seq - 1;
return pending;
}
+/**
+ * Dequeues all RTP packets and pass them to decoder. Not cancellation-safe(?).
+ * This function can be used when the packet source is known not to reorder.
+ */
+void rtp_dequeue_force (demux_t *demux, const rtp_session_t *session)
+{
+ for (unsigned i = 0, max = session->srcc; i < max; i++)
+ {
+ rtp_source_t *src = session->srcv[i];
+ block_t *block;
+
+ while (((block = src->blocks)) != NULL)
+ rtp_decode (demux, session, src);
+ }
+}
/**
* Decodes one RTP packet.