[vlc-devel] [PATCH 09/16] mux: dummy: use sout_mux_operations table
Alexandre Janniaux
ajanni at videolabs.io
Mon Mar 15 17:03:02 UTC 2021
---
modules/mux/dummy.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/mux/dummy.c b/modules/mux/dummy.c
index d9600f41e9..d746eb9c36 100644
--- a/modules/mux/dummy.c
+++ b/modules/mux/dummy.c
@@ -75,10 +75,14 @@ static int Open( vlc_object_t *p_this )
msg_Dbg( p_mux, "Dummy/Raw muxer opened" );
msg_Info( p_mux, "Open" );
- p_mux->pf_control = Control;
- p_mux->pf_addstream = AddStream;
- p_mux->pf_delstream = DelStream;
- p_mux->pf_mux = Mux;
+ static const struct sout_mux_operations mux_ops =
+ {
+ .control = Control,
+ .add_stream = AddStream,
+ .del_stream = DelStream,
+ .mux = Mux,
+ };
+ p_mux->ops = &mux_ops;
p_mux->p_sys = p_sys = malloc( sizeof( sout_mux_sys_t ) );
if( !p_sys )
--
2.30.2
More information about the vlc-devel
mailing list