[vlc-devel] [PATCH] mux/ogg: Fix use of sout_mux_t as sout_mux_sys_t

Marvin Scholz epirat07 at gmail.com
Thu Feb 7 01:31:08 CET 2019


I just stumbled upon this and it looks like that here the
intention was to use the p_sys member for the assignment,
not the sout_mux_t itself as this does not make sense at
all to me and I would guess leads to undefined behavior
if this code is ever executed.

But maybe I am wrong and for some reason this is fine,
after all I am not familiar with this code at all and
have not thorughly read it when making this fix, so
please forgive me if I misunderstood something here.

 modules/mux/ogg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index 3c92dc96e6b..4bba9f89d6c 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -1422,7 +1422,7 @@ static void OggRewriteFisheadPage( sout_mux_t *p_mux )
 static bool AllocateIndex( sout_mux_t *p_mux, sout_input_t *p_input )
-    sout_mux_sys_t *p_sys = p_mux;
+    sout_mux_sys_t *p_sys = p_mux->p_sys;
     ogg_stream_t *p_stream = (ogg_stream_t *) p_input->p_sys;
     size_t i_size;
2.17.2 (Apple Git-113)

More information about the vlc-devel mailing list