[vlc-commits] [Git][videolan/vlc][master] 6 commits: vout_subpictures: fix scaling sign warning
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Mon Jun 1 18:10:00 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
0b676db8 by Steve Lhomme at 2026-06-01T18:31:06+02:00
vout_subpictures: fix scaling sign warning
spu_scale_X() and spu_invscale_X() use signed input outputs. We could use a generic
for that but this seems overkill. The input and scale are unsigned so the output is
also unsigned.
- - - - -
a02a6cf2 by Steve Lhomme at 2026-06-01T18:31:06+02:00
demux: image: fix unused vlc_stream_Read() result
We are skipping 16 bytes that we already read. We know the data skipping will work.
- - - - -
5fa4db4c by Steve Lhomme at 2026-06-01T18:31:06+02:00
dmxmus: fix vlc_stream_Read() comparison sign
offset is a uint_fast16_t so it can be safely be casted to ssize_t.
- - - - -
44ff0eed by Steve Lhomme at 2026-06-01T18:31:06+02:00
srt: fix hint variable shadowing
We only need the hints locally.
- - - - -
c0f2380b by Steve Lhomme at 2026-06-01T18:31:06+02:00
access: pipewire: silence unused callback variables
- - - - -
c0d414fe by Steve Lhomme at 2026-06-01T18:31:06+02:00
demux: aiff: fix always true warning
When compiling for 64-bits targets a uint32_t can never be bigger or equal to SIZE_MAX.
It's only possible if uint32_t is the same size (or bigger) than size_t.
- - - - -
6 changed files:
- modules/access/pipewire.c
- modules/access/srt.c
- modules/demux/aiff.c
- modules/demux/dmxmus.c
- modules/demux/image.c
- src/video_output/vout_subpictures.c
Changes:
=====================================
modules/access/pipewire.c
=====================================
@@ -442,6 +442,7 @@ static void registry_global(void *data, uint32_t id, uint32_t perms,
const char *type, uint32_t version,
const struct spa_dict *props)
{
+ (void) id; (void) perms; (void) version;
demux_t *demux = data;
struct demux_sys_t *sys = demux->p_sys;
=====================================
modules/access/srt.c
=====================================
@@ -108,9 +108,7 @@ static bool srt_schedule_reconnect(stream_t *p_stream)
.streamid = NULL,
.mode = SRT_DEFAULT_MODE, /* default = caller */
};
- struct addrinfo hints = {
- .ai_socktype = SOCK_DGRAM,
- }, *res = NULL;
+ struct addrinfo *res = NULL;
stream_sys_t *p_sys = p_stream->p_sys;
bool failed = false;
@@ -141,6 +139,9 @@ static bool srt_schedule_reconnect(stream_t *p_stream)
if (params.mode != SRT_MODE_LISTENER)
{
+ struct addrinfo hints = {
+ .ai_socktype = SOCK_DGRAM,
+ };
stat = vlc_getaddrinfo( p_sys->psz_host, p_sys->i_port, &hints, &res);
if ( stat )
{
=====================================
modules/demux/aiff.c
=====================================
@@ -114,8 +114,10 @@ static int ReadTextChunk( demux_t *p_demux, uint64_t i_chunk_size, uint32_t i_d
demux_sys_t *p_sys = p_demux->p_sys;
const uint8_t *p_peek;
+#if UINT32_MAX >= SIZE_MAX
if ( i_data_size >= SIZE_MAX )
return VLC_ENOMEM;
+#endif
ssize_t ret = vlc_stream_Peek( p_demux->s, &p_peek, i_chunk_size );
if( ret == -1 || (size_t) ret != i_chunk_size )
=====================================
modules/demux/dmxmus.c
=====================================
@@ -450,7 +450,7 @@ static int Open(vlc_object_t *obj)
sys->length = VLC_TICK_INVALID;
offset -= hdrlen;
- if (vlc_stream_Read(stream, NULL, offset) != offset)
+ if ((size_t)vlc_stream_Read(stream, NULL, offset) != offset)
return VLC_EGENERIC;
}
=====================================
modules/demux/image.c
=====================================
@@ -737,7 +737,7 @@ static int parse_farbfeld_header(vlc_object_t *object, es_format_t *fmt)
fmt->video.i_height = height;
fmt->video.i_chroma = fmt->i_codec = VLC_CODEC_RGBA64;
- vlc_stream_Read(demux->s, NULL, 16);
+ (void) vlc_stream_Read(demux->s, NULL, 16);
return VLC_SUCCESS;
}
=====================================
src/video_output/vout_subpictures.c
=====================================
@@ -1038,15 +1038,15 @@ static struct subpicture_region_rendered *SpuRenderRegion(spu_t *spu,
restrained.y -= y_margin;
SpuAreaMoveInside(&restrained,
- apply_scale ? (output_x + output_width ) : spu_invscale_w(output_x + output_width, scale_size),
- apply_scale ? (output_y + output_height) : spu_invscale_h(output_y + output_height, scale_size));
+ apply_scale ? (output_x + output_width ) : (unsigned)spu_invscale_w(output_x + output_width, scale_size),
+ apply_scale ? (output_y + output_height) : (unsigned)spu_invscale_h(output_y + output_height, scale_size));
/* Fix the position for the current scale_size */
x_offset = spu_scale_w(restrained.x, restrained.scale);
y_offset = spu_scale_h(restrained.y, restrained.scale);
- const unsigned dst_width = apply_scale ? spu_scale_w(region->fmt.i_visible_width, scale_size) : region->fmt.i_visible_width;
- const unsigned dst_height = apply_scale ? spu_scale_h(region->fmt.i_visible_height, scale_size) : region->fmt.i_visible_height;
+ const unsigned dst_width = apply_scale ? (unsigned)spu_scale_w(region->fmt.i_visible_width, scale_size) : region->fmt.i_visible_width;
+ const unsigned dst_height = apply_scale ? (unsigned)spu_scale_h(region->fmt.i_visible_height, scale_size) : region->fmt.i_visible_height;
if (unlikely(dst_width == 0 || dst_height == 0))
return NULL;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/72bc7e23bd2eded9b9b45bb3fcbf47a267428f47...c0d414febe48dec26d2894bec41bef1a63b2c551
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/72bc7e23bd2eded9b9b45bb3fcbf47a267428f47...c0d414febe48dec26d2894bec41bef1a63b2c551
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list