[vlc-devel] [PATCH 13/16] mux: ts: use sout_mux_operations table

Alexandre Janniaux ajanni at videolabs.io
Mon Mar 15 17:03:06 UTC 2021


---
 modules/mux/mpeg/ts.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 069b39affd..809479dbff 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -747,10 +747,14 @@ static int Open( vlc_object_t *p_this )
 
     p_sys->csa = csaSetup(p_this);
 
-    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;
 
     return VLC_SUCCESS;
 }
-- 
2.30.2



More information about the vlc-devel mailing list