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

2023-09-11 Thread Tomas Härdin
sön 2023-09-10 klockan 12:07 +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). > Instead use a macro to produce two functions with the required > types to be const-correct and

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

2023-09-10 Thread 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). Instead use a macro to produce two functions with the required types to be const-correct and type-safe. Signed-off-by: Andreas Rheinhardt --- libavformat/avio.c | 98