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

RTP: implement demux EOF

parent 1cfc0623
......@@ -190,7 +190,11 @@ void *rtp_thread (void *data)
}
void rtp_process (demux_t *demux)
/**
* Process one RTP packet from the de-jitter queue.
* @return 0 on success, -1 on EOF
*/
int rtp_process (demux_t *demux)
{
demux_sys_t *p_sys = demux->p_sys;
mtime_t deadline = INT64_MAX;
......@@ -202,4 +206,6 @@ void rtp_process (demux_t *demux)
else
vlc_cond_wait (&p_sys->wait, &p_sys->lock);
vlc_mutex_unlock (&p_sys->lock);
return p_sys->dead ? -1 : 0;
}
......@@ -632,6 +632,5 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
*/
static int Demux (demux_t *demux)
{
rtp_process (demux);
return 1;
return rtp_process (demux) ? 0 : 1;
}
......@@ -46,7 +46,7 @@ void rtp_queue (demux_t *, rtp_session_t *, block_t *);
bool rtp_dequeue (demux_t *, const rtp_session_t *, mtime_t *);
int rtp_add_type (demux_t *demux, rtp_session_t *ses, const rtp_pt_t *pt);
void rtp_process (demux_t *demux);
int rtp_process (demux_t *demux);
void *rtp_thread (void *data);
/* Global data */
......
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