[vlc-commits] chromaprint: use operation structure
Rémi Denis-Courmont
git at videolan.org
Sat Oct 10 18:40:05 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 19:35:46 2020 +0300| [cba1a80ac1be21f2fcc62704bc24da32610c30dc] | committer: Rémi Denis-Courmont
chromaprint: use operation structure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cba1a80ac1be21f2fcc62704bc24da32610c30dc
---
modules/stream_out/chromaprint.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/stream_out/chromaprint.c b/modules/stream_out/chromaprint.c
index 6b9e029cfa..f082c02233 100644
--- a/modules/stream_out/chromaprint.c
+++ b/modules/stream_out/chromaprint.c
@@ -88,6 +88,10 @@ struct sout_stream_id_sys_t
#define BYTESPERSAMPLE 2
+static const struct sout_stream_operations ops = {
+ Add, Del, Send, NULL, NULL,
+};
+
/*****************************************************************************
* Open:
*****************************************************************************/
@@ -118,9 +122,7 @@ static int Open( vlc_object_t *p_this )
free( p_sys );
return VLC_EGENERIC;
}
- p_stream->pf_add = Add;
- p_stream->pf_del = Del;
- p_stream->pf_send = Send;
+ p_stream->ops = &ops;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list