]> git.sesse.net Git - ffmpeg/commit
avcodec/h263data, ituh263*: Make initializing RL inter table thread-safe
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 2 Dec 2020 02:26:41 +0000 (03:26 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 25 Jan 2021 13:52:58 +0000 (14:52 +0100)
commit61fe481586425a41d45e371de1e875b49882477d
tree04dbbd211420e71fea74a9b87807fd9d17ed8566
parent12d0bb382b7f8f67981ec61aad1ce4f6840ab2dc
avcodec/h263data, ituh263*: Make initializing RL inter table thread-safe

Up until now, ff_h263_rl_inter was initialized by both ituh263dec and
ituh263enc; this is an obstacle in making the codecs that use this code
init-threadsafe.

This obstacle is eliminated by only initializing this RLTable from
a single place that is guarded by a dedicated AVOnce.

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