Projects
Extra
vlc-beta
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 119
View file
_service:obs_scm:vlc-beta-20250923.5437c799d.obscpio/modules/access/amt.c -> _service:obs_scm:vlc-beta-20250923.10c3d8653.obscpio/modules/access/amt.c
Changed
@@ -58,6 +58,7 @@ #include <vlc_block.h> #include <vlc_interrupt.h> #include <vlc_url.h> +#include <vlc_rand.h> #ifdef HAVE_POLL_H #include <poll.h> @@ -323,6 +324,9 @@ bool tryAMT; } access_sys_t; +_Static_assert(sizeof((access_sys_t){0}.glob_ulNonce) == NONCE_LEN, + "glob_ulNonce doesn't match expected nonce length"); + /* Standard open/close functions */ static int Open (vlc_object_t *); static void Close (vlc_object_t *); @@ -1218,13 +1222,11 @@ static void amt_send_relay_discovery_msg( stream_t *p_access, char *relay_ip ) { char chaSendBufferAMT_DISCO_MSG_LEN; - unsigned int ulNonce; ssize_t nRet; access_sys_t *sys = p_access->p_sys; /* initialize variables */ memset( chaSendBuffer, 0, sizeof(chaSendBuffer) ); - ulNonce = 0; /* * create AMT discovery message format @@ -1239,10 +1241,8 @@ chaSendBuffer3 = 0; /* create nonce and copy into send buffer */ - srand( (unsigned int)time(NULL) ); - ulNonce = htonl( rand() ); - memcpy( &chaSendBuffer4, &ulNonce, sizeof(ulNonce) ); - sys->glob_ulNonce = ulNonce; + vlc_rand_bytes (&sys->glob_ulNonce, sizeof (sys->glob_ulNonce)); + memcpy( &chaSendBuffer4, &sys->glob_ulNonce, sizeof(sys->glob_ulNonce) ); /* send it */ nRet = sendto( sys->sAMT, chaSendBuffer, sizeof(chaSendBuffer), 0, &sys->relayDiscoAddr.sa, sys->relayDiscoAddr.sin.sin_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)); @@ -1259,13 +1259,11 @@ static void amt_send_relay_request( stream_t *p_access, char *relay_ip ) { char chaSendBufferAMT_REQUEST_MSG_LEN; - uint32_t ulNonce; int nRet; access_sys_t *sys = p_access->p_sys; memset( chaSendBuffer, 0, sizeof(chaSendBuffer) ); - ulNonce = 0; nRet = 0; /* @@ -1295,8 +1293,7 @@ chaSendBuffer2 = 0; chaSendBuffer3 = 0; - ulNonce = sys->glob_ulNonce; - memcpy( &chaSendBuffer4, &ulNonce, sizeof(uint32_t) ); + memcpy( &chaSendBuffer4, &sys->glob_ulNonce, sizeof(sys->glob_ulNonce) ); nRet = send( sys->sAMT, chaSendBuffer, sizeof(chaSendBuffer), 0 ); @@ -1404,7 +1401,6 @@ int i_sendBufSize = i_amt_hdr_len + IP_HDR_IGMP_LEN; int i_sendBufSizeIPv6 = i_amt_hdr_len + i_ipv6_hdr_len + MLD_REPORT_LEN; char pSendBufferMAC_LEN + NONCE_LEN + AMT_HDR_LEN + IPv6_HOP_BY_HOP_OPTION_LEN + IPv6_FIXED_HDR_LEN + MLD_REPORT_LEN = { 0 }; - uint32_t ulNonce = 0; access_sys_t *sys = p_access->p_sys; pSendBuffer0 = AMT_MEM_UPD; @@ -1413,8 +1409,7 @@ memcpy( &pSendBuffer2, sys->relay_mem_query_msg.uchaMAC, MAC_LEN ); /* copy nonce */ - ulNonce = sys->glob_ulNonce; - memcpy( &pSendBuffer8, &ulNonce, NONCE_LEN ); + memcpy( &pSendBuffer8, &sys->glob_ulNonce, sizeof(sys->glob_ulNonce) ); if ( sys->mcastGroupAddr.sin.sin_family == AF_INET ) {
View file
_service:obs_scm:vlc-beta-20250923.5437c799d.obscpio/modules/hw/vaapi/filters.c -> _service:obs_scm:vlc-beta-20250923.10c3d8653.obscpio/modules/hw/vaapi/filters.c
Changed
@@ -292,6 +292,7 @@ if (filter->vctx_in == NULL || vlc_video_context_GetType(filter->vctx_in) != VLC_VIDEO_CONTEXT_VAAPI) + return VLC_EGENERIC; if (!vlc_vaapi_IsChromaOpaque(filter->fmt_out.video.i_chroma) || !video_format_IsSimilar(&filter->fmt_out.video, &filter->fmt_in.video)) return VLC_EGENERIC;
View file
_service:obs_scm:vlc-beta-20250923.5437c799d.obscpio/modules/stream_out/duplicate.c -> _service:obs_scm:vlc-beta-20250923.10c3d8653.obscpio/modules/stream_out/duplicate.c
Changed
@@ -105,7 +105,7 @@ * duplicated stream and select the lowest to forward it to the sink. *****************************************************************************/ -static void *PCRSelectorAdd( sout_stream_t *stream, +static void *PCRSelectorAdd( sout_stream_t *stream, const es_format_t *fmt, const char *es_id ) { @@ -161,7 +161,7 @@ sout_StreamNew( VLC_OBJECT(parent), "duplicate-pcr-select{}" ); if( unlikely(selector == NULL) ) return NULL; - + static const struct sout_stream_operations ops = { .add = PCRSelectorAdd, .del = PCRSelectorDel, @@ -172,7 +172,7 @@ }; selector->ops = &ops; selector->p_sys = parent->p_sys; - + return selector; } @@ -463,7 +463,7 @@ vlc_frame_Release( frame ); return VLC_ENOMEM; } - + sout_StreamIdSend( dup_id->stream_owner, dup_id->id, to_send ); }
View file
_service:obs_scm:vlc-beta-20250923.5437c799d.obscpio/modules/stream_out/rtp.c -> _service:obs_scm:vlc-beta-20250923.10c3d8653.obscpio/modules/stream_out/rtp.c
Changed
@@ -451,30 +451,26 @@ if ((psz == NULL) || !strcasecmp (psz, "udp")) (void)0; /* default */ - else - if (!strcasecmp (psz, "dccp")) + else if (!strcasecmp (psz, "dccp")) { p_sys->proto = IPPROTO_DCCP; p_sys->rtcp_mux = true; /* Force RTP/RTCP mux */ } #if 0 - else - if (!strcasecmp (psz, "sctp")) + else if (!strcasecmp (psz, "sctp")) { p_sys->proto = IPPROTO_TCP; p_sys->rtcp_mux = true; /* Force RTP/RTCP mux */ } #endif #if 0 - else - if (!strcasecmp (psz, "tcp")) + else if (!strcasecmp (psz, "tcp")) { p_sys->proto = IPPROTO_TCP; p_sys->rtcp_mux = true; /* Force RTP/RTCP mux */ } #endif - else - if (!strcasecmp (psz, "udplite") || !strcasecmp (psz, "udp-lite")) + else if (!strcasecmp (psz, "udplite") || !strcasecmp (psz, "udp-lite")) p_sys->proto = IPPROTO_UDPLITE; else msg_Warn (p_this, "unknown or unsupported transport protocol \"%s\"", @@ -1008,11 +1004,9 @@ uint16_t i_port = 0; if( p_fmt == NULL ) ; - else - if( p_fmt->i_cat == AUDIO_ES && p_sys->i_port_audio > 0 ) + else if( p_fmt->i_cat == AUDIO_ES && p_sys->i_port_audio > 0 ) i_port = p_sys->i_port_audio; - else - if( p_fmt->i_cat == VIDEO_ES && p_sys->i_port_video > 0 ) + else if( p_fmt->i_cat == VIDEO_ES && p_sys->i_port_video > 0 ) i_port = p_sys->i_port_video; /* We do not need the ES lock (p_sys->lock_es) here, because @@ -1095,23 +1089,23 @@ } if( p_fmt != NULL ) - switch( p_fmt->i_codec ) - { - case VLC_CODEC_MULAW: - case VLC_CODEC_ALAW: - case VLC_CODEC_U8: - rtp_set_ptime (id, 20, 1); - break; - case VLC_CODEC_S16B: - case VLC_CODEC_S16L: - rtp_set_ptime (id, 20, 2); - break; - case VLC_CODEC_S24B: - rtp_set_ptime (id, 20, 3); - break; - default: - break; - } + switch( p_fmt->i_codec ) + { + case VLC_CODEC_MULAW: + case VLC_CODEC_ALAW: + case VLC_CODEC_U8: + rtp_set_ptime (id, 20, 1); + break; + case VLC_CODEC_S16B: + case VLC_CODEC_S16L: + rtp_set_ptime (id, 20, 2); + break; + case VLC_CODEC_S24B: + rtp_set_ptime (id, 20, 3); + break; + default: + break; + } #if 0 /* No payload formats sets this at the moment */ int cscov = -1;
View file
_service:obs_scm:vlc-beta.obsinfo
Changed
@@ -1,4 +1,4 @@ name: vlc-beta -version: 20250923.5437c799d -mtime: 1758640236 -commit: 5437c799db795ca9c0e322771643bc177cf4b864 +version: 20250923.10c3d8653 +mtime: 1758663431 +commit: 10c3d86539ca6ff2fdc5dbb4caca681b90961ec4
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.