[vlc-commits] sout dummy: use operation structure
Rémi Denis-Courmont
git at videolan.org
Sat Oct 10 18:40:11 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 19:37:26 2020 +0300| [13162ca6f5d6927fff4af8fe838daf0266efe361] | committer: Rémi Denis-Courmont
sout dummy: use operation structure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=13162ca6f5d6927fff4af8fe838daf0266efe361
---
modules/stream_out/dummy.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/stream_out/dummy.c b/modules/stream_out/dummy.c
index 3fad0cf6b5..fcff156546 100644
--- a/modules/stream_out/dummy.c
+++ b/modules/stream_out/dummy.c
@@ -52,6 +52,10 @@ static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer )
return VLC_SUCCESS;
}
+static const struct sout_stream_operations ops = {
+ Add, Del, Send, NULL, NULL,
+};
+
/*****************************************************************************
* Open:
*****************************************************************************/
@@ -59,12 +63,7 @@ static int Open( vlc_object_t *p_this )
{
sout_stream_t *p_stream = (sout_stream_t*)p_this;
- p_stream->pf_add = Add;
- p_stream->pf_del = Del;
- p_stream->pf_send = Send;
-
- p_stream->p_sys = NULL;
-
+ p_stream->ops = &ops;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list