[vlc-commits] autodel: use operation structure
Rémi Denis-Courmont
git at videolan.org
Mon Apr 20 17:06:45 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 19 14:26:59 2020 +0300| [c8597f0fdca32f14f8471973f14816a2abf1998e] | committer: Rémi Denis-Courmont
autodel: use operation structure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c8597f0fdca32f14f8471973f14816a2abf1998e
---
modules/stream_out/autodel.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/stream_out/autodel.c b/modules/stream_out/autodel.c
index 82b9845746..6c4ce40c60 100644
--- a/modules/stream_out/autodel.c
+++ b/modules/stream_out/autodel.c
@@ -117,6 +117,10 @@ static int Send( sout_stream_t *p_stream, void *_p_es, block_t *p_buffer )
return VLC_SUCCESS;
}
+static const struct sout_stream_operations ops = {
+ Add, Del, Send, NULL, NULL,
+};
+
static int Open( vlc_object_t *p_this )
{
sout_stream_t *p_stream = (sout_stream_t*)p_this;
@@ -128,11 +132,8 @@ static int Open( vlc_object_t *p_this )
p_sys->pp_es = NULL;
p_sys->i_es_num = 0;
- p_stream->pf_add = Add;
- p_stream->pf_del = Del;
- p_stream->pf_send = Send;
-
- p_stream->p_sys = p_sys;
+ p_stream->ops = &ops;
+ p_stream->p_sys = p_sys;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list