[vlc-devel] [PATCH] mms: rewrite recv with cast and vlc_recv_i11e
Alexandre Janniaux
ajanni at videolabs.io
Fri Mar 27 14:24:07 CET 2020
It fixes warning on uint8_t* being used as char*, while using
interruptible IO function.
---
modules/access/mms/mmstu.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index 4c0c5a62e6..9f1bffb803 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -1123,17 +1123,18 @@ static int NetFillBuffer( stream_t *p_access )
if( ( i_tcp > 0 ) && ufd[0].revents )
{
- i_tcp_read =
- recv( p_sys->i_handle_tcp,
- p_sys->buffer_tcp + p_sys->i_buffer_tcp,
- i_tcp + MMS_BUFFER_SIZE/2, 0 );
+ i_tcp_read = vlc_recv_i11e(
+ p_sys->i_handle_tcp,
+ (char *)p_sys->buffer_tcp + p_sys->i_buffer_tcp,
+ i_tcp + MMS_BUFFER_SIZE/2, 0 );
}
if( i_udp > 0 && ufd[i_tcp > 0].revents )
{
- i_udp_read = recv( p_sys->i_handle_udp,
- p_sys->buffer_udp + p_sys->i_buffer_udp,
- i_udp + MMS_BUFFER_SIZE/2, 0 );
+ i_udp_read = vlc_recv_i11e(
+ p_sys->i_handle_udp,
+ (char*)p_sys->buffer_udp + p_sys->i_buffer_udp,
+ i_udp + MMS_BUFFER_SIZE/2, 0 );
}
#ifdef MMS_DEBUG
--
2.26.0
More information about the vlc-devel
mailing list