[vlc-devel] [PATCH 3/3] demux: p_next and s are mutually exclusive and private to the demuxer
Steve Lhomme
robux4 at videolabs.io
Thu Jun 23 18:29:43 CEST 2016
--
replaces https://patches.videolan.org/patch/13772/ + https://patches.videolan.org/patch/13771/
---
include/vlc_demux.h | 9 +++++----
src/input/demux.c | 2 --
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/include/vlc_demux.h b/include/vlc_demux.h
index 2a4b08f..3c121d2 100644
--- a/include/vlc_demux.h
+++ b/include/vlc_demux.h
@@ -54,7 +54,11 @@ struct demux_t
char *psz_file;
/* input stream */
- stream_t *s; /* NULL in case of a access+demux in one */
+ union
+ {
+ stream_t *s; /* NULL in case of a access+demux in one */
+ demux_t *p_next;/* demux_t filter chaining */
+ };
/* es output */
es_out_t *out; /* our p_es_out */
@@ -79,9 +83,6 @@ struct demux_t
/* Weak link to parent input */
input_thread_t *p_input;
-
- /* demux_t filter chaining */
- demux_t *p_next;
};
/* pf_demux return values */
diff --git a/src/input/demux.c b/src/input/demux.c
index c64024e..dff9a5b 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -160,7 +160,6 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
p_demux->pf_demux = NULL;
p_demux->pf_control = NULL;
- p_demux->p_next = NULL;
p_demux->p_sys = NULL;
p_demux->info.i_update = 0;
p_demux->info.i_title = 0;
@@ -719,7 +718,6 @@ static demux_t *demux_FilterNew( demux_t *p_next, const char *p_name )
demux_t *p_demux = &priv->demux;
p_demux->p_next = p_next;
- p_demux->s = NULL;
p_demux->p_input = NULL;
p_demux->p_sys = NULL;
p_demux->psz_access = NULL;
--
2.8.2
More information about the vlc-devel
mailing list