[vlc-commits] cycle: use operation structure
Rémi Denis-Courmont
git at videolan.org
Sat Oct 10 18:40:10 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 19:37:15 2020 +0300| [417acba09e005c10baedee7b030c1e939bb5c9eb] | committer: Rémi Denis-Courmont
cycle: use operation structure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=417acba09e005c10baedee7b030c1e939bb5c9eb
---
modules/stream_out/cycle.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/stream_out/cycle.c b/modules/stream_out/cycle.c
index 673f126dbd..94287387a1 100644
--- a/modules/stream_out/cycle.c
+++ b/modules/stream_out/cycle.c
@@ -232,6 +232,10 @@ static vlc_tick_t ParseTime(const char *str)
return -1;
}
+static const struct sout_stream_operations ops = {
+ Add, Del, Send, NULL, NULL,
+};
+
static int Open(vlc_object_t *obj)
{
sout_stream_t *stream = (sout_stream_t *)obj;
@@ -297,9 +301,7 @@ static int Open(vlc_object_t *obj)
sys->next = sys->start;
sys->period = offset;
- stream->pf_add = Add;
- stream->pf_del = Del;
- stream->pf_send = Send;
+ stream->ops = &ops;
stream->p_sys = sys;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list