[vlc-commits] smem: use operation structure
Rémi Denis-Courmont
git at videolan.org
Sat Oct 10 11:46:03 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 12:45:25 2020 +0300| [290e737f87391404ee4f2304fa46e8eb62bcc608] | committer: Rémi Denis-Courmont
smem: use operation structure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=290e737f87391404ee4f2304fa46e8eb62bcc608
---
modules/stream_out/smem.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/stream_out/smem.c b/modules/stream_out/smem.c
index 01e3ad565a..646206ae3c 100644
--- a/modules/stream_out/smem.c
+++ b/modules/stream_out/smem.c
@@ -189,6 +189,10 @@ void AudioPostrenderDefaultCallback( void* p_audio_data, uint8_t* p_pcm_buffer,
VLC_UNUSED( bits_per_sample ); VLC_UNUSED( size ); VLC_UNUSED( pts );
}
+static const struct sout_stream_operations ops = {
+ Add, Del, Send, NULL, NULL,
+};
+
/*****************************************************************************
* Open:
*****************************************************************************/
@@ -233,9 +237,7 @@ static int Open( vlc_object_t *p_this )
p_sys->pf_audio_postrender_callback = AudioPostrenderDefaultCallback;
/* Setting stream out module callbacks */
- p_stream->pf_add = Add;
- p_stream->pf_del = Del;
- p_stream->pf_send = Send;
+ p_stream->ops = &ops;
p_stream->pace_nocontrol = p_sys->time_sync;
return VLC_SUCCESS;
More information about the vlc-commits
mailing list