[vlc-commits] gather: use operation structure

Rémi Denis-Courmont git at videolan.org
Sat Oct 10 18:40:15 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 19:37:41 2020 +0300| [3a8e38013f150f0f21b6ce50c9fd2347ec2f5219] | committer: Rémi Denis-Courmont

gather: use operation structure

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3a8e38013f150f0f21b6ce50c9fd2347ec2f5219
---

 modules/stream_out/gather.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/gather.c b/modules/stream_out/gather.c
index 4751bfdadd..1ea3776803 100644
--- a/modules/stream_out/gather.c
+++ b/modules/stream_out/gather.c
@@ -68,6 +68,10 @@ typedef struct
     sout_stream_id_sys_t **id;
 } sout_stream_sys_t;
 
+static const struct sout_stream_operations ops = {
+    Add, Del, Send, NULL, NULL,
+};
+
 /*****************************************************************************
  * Open:
  *****************************************************************************/
@@ -80,9 +84,7 @@ static int Open( vlc_object_t *p_this )
     if( p_sys == NULL )
         return VLC_EGENERIC;
 
-    p_stream->pf_add    = Add;
-    p_stream->pf_del    = Del;
-    p_stream->pf_send   = Send;
+    p_stream->ops = &ops;
 
     TAB_INIT( p_sys->i_id, p_sys->id );
 



More information about the vlc-commits mailing list