[FFmpeg-devel] [PATCH 01/21] avformat/avio: Don't use incompatible function pointer type for call

Tomas Härdin git at haerdin.se
Sat Sep 9 09:36:20 EEST 2023


tor 2023-09-07 klockan 02:23 +0200 skrev Andreas Rheinhardt:
> It is undefined behaviour even in cases where it works
> (it works because it is only a const uint8_t* vs. uint8_t*
> difference).
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavformat/avio.c | 25 ++++++++++++++++---------
>  1 file changed, 16 insertions(+), 9 deletions(-)

Looks OK. It's probably possible to get around the need for cbuf by
casting to/from uintptr_t, but using cbuf is more type safe

/Tomas


More information about the ffmpeg-devel mailing list