[vlc-commits] transcode: use operation structure

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 19:04:40 2020 +0300| [2c109efccb253134a09098ae0bd57ca2d8260a14] | committer: Rémi Denis-Courmont

transcode: use operation structure

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

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

diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index 019deadc47..369e03af0c 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -380,6 +380,10 @@ static int Control( sout_stream_t *p_stream, int i_query, va_list args )
     return VLC_EGENERIC;
 }
 
+static const struct sout_stream_operations ops = {
+    Add, Del, Send, Control, NULL,
+};
+
 /*****************************************************************************
  * Open:
  *****************************************************************************/
@@ -465,12 +469,8 @@ static int Open( vlc_object_t *p_this )
     p_sys->vfilters_cfg.video.b_reorient = p_sys->b_soverlay ||
                                            p_sys->vfilters_cfg.video.psz_spu_sources;
 
-    p_stream->pf_add    = Add;
-    p_stream->pf_del    = Del;
-    p_stream->pf_send   = Send;
-    p_stream->pf_control = Control;
     p_stream->p_sys     = p_sys;
-
+    p_stream->ops = &ops;
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list