Commit 94f9d6e0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: skip reordering timer in case of TCP

parent 05c3deaf
......@@ -163,7 +163,6 @@ void *rtp_stream_thread (void *opaque)
for (;;)
{
/* There is no reordering on stream sockets, so no timeout. */
/* FIXME: hack rtp_dequeue() to skip the reordering/timer */
ssize_t val;
uint16_t frame_len;
......@@ -186,6 +185,7 @@ void *rtp_stream_thread (void *opaque)
int canc = vlc_savecancel ();
rtp_process (demux, block);
rtp_dequeue_force (demux, sys->session);
vlc_restorecancel (canc);
}
#else
......
......@@ -52,6 +52,7 @@ rtp_session_t *rtp_session_create (demux_t *);
void rtp_session_destroy (demux_t *, rtp_session_t *);
void rtp_queue (demux_t *, rtp_session_t *, block_t *);
bool rtp_dequeue (demux_t *, const rtp_session_t *, mtime_t *);
void rtp_dequeue_force (demux_t *, const rtp_session_t *);
int rtp_add_type (demux_t *demux, rtp_session_t *ses, const rtp_pt_t *pt);
void *rtp_dgram_thread (void *data);
......
......@@ -461,6 +461,21 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session,
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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment