[vlc-commits] [Git][videolan/vlc][master] 9 commits: live555: use size_t when suitable

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Wed Jan 22 10:01:15 UTC 2025



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
8b745265 by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
live555: use size_t when suitable

This provides function overload on top of the parseStream* functions
from liveMedia to use size_t where possible in the file. To avoid
ambiguous definition on platforms like Android, those overloads are only
defined when size_t and unsigned are different types.

- - - - -
76045605 by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
avformat: demux: use size_t for extradata

A cast to (size_t) is added for the intermediate version. It would fix
the following warning that is happening before:

    ../../modules/demux/avformat/demux.c: In function ‘Demux’:
    ../../modules/demux/avformat/demux.c:827:28: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
      827 |         if( side_data_size != p_track->es_format.i_extra ||
          |                            ^~

- - - - -
0c86c8da by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
mediacodec: use size_t where suited

- - - - -
723004ff by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
mux: asf: use size_t for extradata

- - - - -
dd45d3b9 by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
FakeESOutID: use != for boolean xor

^ is a bitwise xor, != is the correct operator to write a logical xor.

- - - - -
48452d5a by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
vlc_es: change i_extra into size_t

This MR changes es_format_t::i_extra from a signed int to size_t.

This variable is used to describe the size of the buffer pointed by
p_extra, and is never strictly negative.

Users of this member are also updated in this commit at once. I'm not
sure it's easy to split, except if callers are casted to size_t before
usage in a preparatory change, and then the cast is removed in a cleanup
change.

Some users were already using size_t though, like videotoolbox decoder
or hxxx_helpers.c. The main blocker for splitting is that most clients
not doing that are actually using pointers to i_extra instead of using a
copy, which is much more verbose to fix locally.

Almost No unneeded cast is added to fix signedness mismatch in this
patch. Most notably, only mpeg/ts_psi.c gets a new cast when using
__MIN() with fmt->i_extra, since the dvbpsi_descriptor_t::i_length
parameter is signed.

avformat/demux.c gets a temporary cast which is no-op with a version
libavutil >= 57 but which would trigger the warning before that. It may
be removed when libavutil < 57 is dropped.

- - - - -
7d361217 by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
demux: use size_t for xiph-related functions

- - - - -
961e8ce9 by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
demux: caf: use size_t

- - - - -
8db421f5 by Alexandre Janniaux at 2025-01-22T09:29:14+00:00
demux: mkv: use size_t

- - - - -


30 changed files:

- include/vlc_es.h
- modules/access/live555.cpp
- modules/access/rtp/xiph.c
- modules/codec/flac.c
- modules/codec/kate.c
- modules/codec/omxil/mediacodec.c
- modules/codec/opus.c
- modules/codec/opus_header.c
- modules/codec/opus_header.h
- modules/codec/speex.c
- modules/codec/stl.c
- modules/codec/substx3g.c
- modules/codec/theora.c
- modules/codec/vorbis.c
- modules/demux/adaptive/plumbing/FakeESOutID.cpp
- modules/demux/avformat/demux.c
- modules/demux/avformat/mux.c
- modules/demux/caf.c
- modules/demux/mkv/matroska_segment_parse.cpp
- modules/demux/mkv/mkv.hpp
- modules/demux/mp4/avci.h
- modules/demux/mp4/essetup.c
- modules/demux/mpeg/ts_psi.c
- modules/demux/ogg.c
- modules/demux/ogg.h
- modules/demux/wav.c
- modules/demux/xiph.h
- modules/demux/xiph_test.c
- modules/hw/nvdec/nvdec.c
- modules/mux/asf.c


The diff was not included because it is too large.


View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/00fb0120934881d297eeb0e4a13e1acd0ef75e12...8db421f54f81d4fac11526281a7dead8c0f0b011

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/00fb0120934881d297eeb0e4a13e1acd0ef75e12...8db421f54f81d4fac11526281a7dead8c0f0b011
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list