avcodec/lossless_videoencdsp: Fix unaligned access
HAVE_FAST_UNALIGNED being true does not imply that one can simply read from any pointer via *(long*). It is undefined behaviour in case the pointer is not sufficiently aligned; and even if it is, it is (likely) a violation of the effective-type rules. Fix both of these by using the appropriate AV_[RW]N macros. Also, the current code used sizeof(long) as if this were the CPU's native arithmetic size, but this is not true on 64bit Windows. This has been fixed, too. This affected huffyuv FATE-tests. Tested-by:Sean McGovern <gseanmcg@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Showing
Please register or sign in to comment