Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_parser: Fix undefined left shift

2020-05-29 Thread Michael Niedermayer
On Fri, May 29, 2020 at 06:17:54PM +0200, Andreas Rheinhardt wrote: > Use an uint32_t for the NAL unit size of an AVC H.264 NAL unit instead > of an int as a left shift of a signed value is undefined behaviour > if the result doesn't fit into the target type. > > Also make the log message never

[FFmpeg-devel] [PATCH 1/2] avcodec/h264_parser: Fix undefined left shift

2020-05-29 Thread Andreas Rheinhardt
Use an uint32_t for the NAL unit size of an AVC H.264 NAL unit instead of an int as a left shift of a signed value is undefined behaviour if the result doesn't fit into the target type. Also make the log message never output negative lengths. Signed-off-by: Andreas Rheinhardt ---