Browse Source
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.pull/176/head
committed by
Jean-Baptiste Kempf
21 changed files with 40 additions and 35 deletions
Loading…
Reference in new issue