[FFmpeg-devel] [PATCH 17/39] avcodec/me_cmp: Remove ff_check_alignment()
Anton Khirnov
anton at khirnov.net
Mon Jan 18 12:19:32 EET 2021
Quoting Andreas Rheinhardt (2020-12-10 12:16:35)
> 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.
Furthermore even if this should be checked at all, this is not the place
for it.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> libavcodec/me_cmp.c | 23 -----------------------
> libavcodec/me_cmp.h | 2 --
> libavcodec/mpegvideo_enc.c | 6 ------
> 3 files changed, 31 deletions(-)
Patch very ok
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list