[vlc-commits] dlna: use operation structure

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 18:58:21 2020 +0300| [5a1fe06b95f58d210464776fcfa97e0ec2970f17] | committer: Rémi Denis-Courmont

dlna: use operation structure

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

 modules/stream_out/dlna/dlna.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/stream_out/dlna/dlna.cpp b/modules/stream_out/dlna/dlna.cpp
index 44fcef90ec..9f796d4a65 100644
--- a/modules/stream_out/dlna/dlna.cpp
+++ b/modules/stream_out/dlna/dlna.cpp
@@ -900,6 +900,10 @@ static void Del(sout_stream_t *p_stream, void *_id)
     }
 }
 
+static const struct sout_stream_operations ops = {
+    Add, Del, Send, NULL, Flush,
+};
+
 int OpenSout( vlc_object_t *p_this )
 {
     sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_this);
@@ -940,12 +944,8 @@ int OpenSout( vlc_object_t *p_this )
 
     p_sys->device_protocols = p_sys->renderer->GetProtocolInfo();
 
-    p_stream->pf_add     = Add;
-    p_stream->pf_del     = Del;
-    p_stream->pf_send    = Send;
-    p_stream->pf_flush   = Flush;
-
     p_stream->p_sys = p_sys;
+    p_stream->ops = &ops;
 
     free(base_url);
     free(device_url);



More information about the vlc-commits mailing list