[vlc-commits] RTP input: keep track of chained demux
Rémi Denis-Courmont
git at videolan.org
Tue Aug 21 17:32:55 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 18 19:28:30 2009 +0300| [48c929bf78e8e3d8c5caa152b2d9cbced7aba4e3] | committer: Rémi Denis-Courmont
RTP input: keep track of chained demux
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48c929bf78e8e3d8c5caa152b2d9cbced7aba4e3
---
modules/access/rtp/rtp.c | 14 ++++++++++++--
modules/access/rtp/rtp.h | 1 +
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c
index d722b8c..981b544 100644
--- a/modules/access/rtp/rtp.c
+++ b/modules/access/rtp/rtp.c
@@ -254,6 +254,7 @@ static int Open (vlc_object_t *obj)
return VLC_EGENERIC;
}
+ p_sys->chained_demux = NULL;
#ifdef HAVE_SRTP
p_sys->srtp = NULL;
#endif
@@ -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)
{
- 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)
{
+ demux_sys_t *p_sys = demux->p_sys;
+
if (data)
+ {
stream_Delete ((stream_t *)data);
- (void)demux;
+ p_sys->chained_demux = NULL;
+ }
}
/* Send a packet to a chained demuxer */
diff --git a/modules/access/rtp/rtp.h b/modules/access/rtp/rtp.h
index 1625d16..d36744f 100644
--- a/modules/access/rtp/rtp.h
+++ b/modules/access/rtp/rtp.h
@@ -62,6 +62,7 @@ void *rtp_stream_thread (void *data);
struct demux_sys_t
{
rtp_session_t *session;
+ stream_t *chained_demux;
#ifdef HAVE_SRTP
struct srtp_session_t *srtp;
#endif
More information about the vlc-commits
mailing list