[FFmpeg-devel] [PATCH 02/45] avcodec/a64multienc: Mark encoders as init-threadsafe
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Wed Feb 3 22:18:07 EET 2021
Anton Khirnov:
> Quoting Andreas Rheinhardt (2020-11-27 02:02:06)
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
>> ---
>> libavcodec/a64multienc.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Actually seems I was mistaken - render_charset() contains three static
> arrays which seem to be used in a very racy manner.
>
The reason I didn't spot this is because these arrays are not accessible
from the init function at all: I start reading the init function and
look at all code accessible from it; if it contains no races, I add the
flag to mark the codec as init-threadsafe. Also notice that for this bug
it is irrelevant whether the codec is marked as init-threadsafe.
But will nevertheless fix this.
- Andreas
More information about the ffmpeg-devel
mailing list