]> git.sesse.net Git - ffmpeg/commit
avcodec/mpeg4video: Make initializing RLTable thread-safe
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 10 Dec 2020 03:32:17 +0000 (04:32 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Mon, 26 Apr 2021 22:40:18 +0000 (00:40 +0200)
commitd99707b42a55b2fcfc17b8c9bf3f38c1879dbaa7
treeeadd12b2001dee25c4accb123d7b881173306645
parentfea1f42e5f82db01ef3eec6ee8b0862944a5e319
avcodec/mpeg4video: Make initializing RLTable thread-safe

Up until now the RLTable ff_mpeg4_rl_intra was initialized by both mpeg4
decoder and encoder (except the VLCs that are only used by the decoder).
This is an obstacle to making these codecs init-threadsafe, so move
initializing this to a single function that is guarded by a dedicated
AVOnce.

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