]> git.sesse.net Git - ffmpeg/commit
avcodec/me_cmp: Remove ff_check_alignment()
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 1 Dec 2020 23:20:04 +0000 (00:20 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 21 Jan 2021 18:13:06 +0000 (19:13 +0100)
commitb3473841731eebf5c32077f931334820316f16c6
tree387fe2562519ea7e4517848d531d843ae6657e98
parent1f9ef2f3cf0812c9ad3e3055946673375c982cac
avcodec/me_cmp: Remove ff_check_alignment()

The usage of a static variable presents a potential for data races and
means that this function can't be used in init functions of codecs with
FF_CODEC_CAP_INIT_THREADSAFE (unless of course one presumes that
everything is alright in which case the error is not triggered; but then
the whole function is pointless...). This makes the Snow decoder
init-threadsafe as it already claims.

Notice that this function has been removed in 2014 by Libav in commit
9103185bd116930f90b847090e66a64fa9971ce2, because only some codepaths
are checked this way and because it only affects legacy compilers. The
latter is of course even more true today.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/me_cmp.c
libavcodec/me_cmp.h
libavcodec/mpegvideo_enc.c