[FFmpeg-devel] [PATCH 1/4] avcodec/startcode: Use AV_RN due to UBSan warning about unaligned access

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Jan 22 17:05:41 EET 2020


Am Mi., 22. Jan. 2020 um 15:57 Uhr schrieb Andreas Rheinhardt
<andreas.rheinhardt at gmail.com>:
>
> when directly accessing a buffer via a pointer to uint8_t cast to a
> pointer to uint64_t/uint32_t. This happened only if HAVE_FAST_UNALIGNED
> was set, so it was ok, but UBSan nevertheless complained about unaligned
> accesses. So simply use AV_RNxx to read the buffer; this also improves
> readability.

Is there a speed impact?

Carl Eugen


More information about the ffmpeg-devel mailing list