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

RTP input: keep track of chained demux

parent 6b19c143
...@@ -254,6 +254,7 @@ static int Open (vlc_object_t *obj) ...@@ -254,6 +254,7 @@ static int Open (vlc_object_t *obj)
return VLC_EGENERIC; return VLC_EGENERIC;
} }
p_sys->chained_demux = NULL;
#ifdef HAVE_SRTP #ifdef HAVE_SRTP
p_sys->srtp = NULL; p_sys->srtp = NULL;
#endif #endif
...@@ -443,14 +444,23 @@ void codec_decode (demux_t *demux, void *data, block_t *block) ...@@ -443,14 +444,23 @@ void codec_decode (demux_t *demux, void *data, block_t *block)
static void *stream_init (demux_t *demux, const char *name) static void *stream_init (demux_t *demux, const char *name)
{ {
return stream_DemuxNew (demux, name, demux->out); demux_sys_t *p_sys = demux->p_sys;
if (p_sys->chained_demux != NULL)
return NULL;
p_sys->chained_demux = stream_DemuxNew (demux, name, demux->out);
return p_sys->chained_demux;
} }
static void stream_destroy (demux_t *demux, void *data) static void stream_destroy (demux_t *demux, void *data)
{ {
demux_sys_t *p_sys = demux->p_sys;
if (data) if (data)
{
stream_Delete ((stream_t *)data); stream_Delete ((stream_t *)data);
(void)demux; p_sys->chained_demux = NULL;
}
} }
/* Send a packet to a chained demuxer */ /* Send a packet to a chained demuxer */
......
...@@ -62,6 +62,7 @@ void *rtp_stream_thread (void *data); ...@@ -62,6 +62,7 @@ void *rtp_stream_thread (void *data);
struct demux_sys_t struct demux_sys_t
{ {
rtp_session_t *session; rtp_session_t *session;
stream_t *chained_demux;
#ifdef HAVE_SRTP #ifdef HAVE_SRTP
struct srtp_session_t *srtp; struct srtp_session_t *srtp;
#endif #endif
......
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