[vlc-commits] sout standard: use operation structure

Rémi Denis-Courmont git at videolan.org
Sat Oct 10 11:49:01 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 12:45:25 2020 +0300| [aa21e6db6bf5aec260de635c9218527425fc4478] | committer: Rémi Denis-Courmont

sout standard: use operation structure

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

 modules/stream_out/standard.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index eb76e70b94..20d3f0ba21 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -315,6 +315,10 @@ static void checkAccessMux( sout_stream_t *p_stream, char *psz_access,
     }
 }
 
+static const struct sout_stream_operations ops = {
+    Add, Del, Send, NULL, Flush,
+};
+
 /*****************************************************************************
  * Open:
  *****************************************************************************/
@@ -399,10 +403,7 @@ static int Open( vlc_object_t *p_this )
     if( var_GetBool( p_stream, SOUT_CFG_PREFIX"sap" ) )
         create_SDP( p_stream, p_access );
 
-    p_stream->pf_add    = Add;
-    p_stream->pf_del    = Del;
-    p_stream->pf_send   = Send;
-    p_stream->pf_flush  = Flush;
+    p_stream->ops = &ops;
     if( !sout_AccessOutCanControlPace( p_access ) )
         p_stream->pace_nocontrol = true;
 



More information about the vlc-commits mailing list