[vlc-devel] [PATCH 06/16] mux: avi: use sout_mux_operations table

Alexandre Janniaux ajanni at videolabs.io
Mon Mar 15 17:02:59 UTC 2021


---
 modules/mux/avi.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/mux/avi.c b/modules/mux/avi.c
index 844d983b42..58bde36e8d 100644
--- a/modules/mux/avi.c
+++ b/modules/mux/avi.c
@@ -186,11 +186,14 @@ static int Open( vlc_object_t *p_this )
     }
     p_sys->b_write_header = true;
 
-
-    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;
 
     return VLC_SUCCESS;
-- 
2.30.2



More information about the vlc-devel mailing list