From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH 10/10] avcodec/avcodec: Remove outdated comment Date: Thu, 6 Jan 2022 08:08:45 +0100 Message-ID: <AM7PR03MB6660FA3593621E0AE150B3BF8F4C9@AM7PR03MB6660.eurprd03.prod.outlook.com> (raw) In-Reply-To: <3265CAD5-E004-467B-B8E7-3A9BC7EF01A6@gmail.com> Marvin Scholz: > > > On 5 Jan 2022, at 22:56, Andreas Rheinhardt wrote: > >> avcodec_open2() is supposed to be thread-safe (those codecs >> whose init functions are not thread-safe are guarded >> by a global lock). >> > > Maybe it would be better to note since which version this is > the case, or at least mention it in the api changelog? > There can be a data race with current git master if an mpeg4 decoder is opened concurrently with an mpeg4-parser. This is fixed in patch #6 of this patchset. (Actually, avcodec_open2() is supposed to be thread-safe since the introduction of the global lock, yet in practice there were several issues with this; one of this is fixed in #6. Other issues were that the AAC codecs claimed to be init-threadsafe, yet weren't for a long time (see 195d8ce85eb73ff283f85dcee63383ec4081e3e7).) >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> >> --- >> libavcodec/avcodec.h | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h >> index 7ee8bc2b7c..ec1a0566a4 100644 >> --- a/libavcodec/avcodec.h >> +++ b/libavcodec/avcodec.h >> @@ -2384,8 +2384,6 @@ int avcodec_parameters_to_context(AVCodecContext >> *codec, >> * avcodec_find_decoder() and avcodec_find_encoder() provide an easy >> way for >> * retrieving a codec. >> * >> - * @warning This function is not thread safe! >> - * >> * @note Always call this function before using decoding routines >> (such as >> * @ref avcodec_receive_frame()). >> * >> -- _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-01-06 7:08 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-05 21:53 [FFmpeg-devel] [PATCH 01/10] avcodec/mpeg12dec: Don't set write-only variable Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 02/10] avcodec/mpegvideo: Don't unnecessarily allocate buffers Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 03/10] avcodec/mpegvideo: Avoid macro/av_calloc for ordinary allocations Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 04/10] avcodec/h263: Move functions only used once to their caller Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 05/10] avcodec/mpeg4video: Skip unneeded element when parsing picture header Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 06/10] avcodec/mpeg4videodec: Fix data race when initializing VLCs Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 07/10] avcodec/rl: Don't pretend ff_rl_init() initializes a RLTable twice Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 08/10] avcodec/bitstream: Don't pretend VLCs to be initialized concurrently Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 09/10] avcodec: Remove unnecessary h263.h inclusions Andreas Rheinhardt 2022-01-05 21:56 ` [FFmpeg-devel] [PATCH 10/10] avcodec/avcodec: Remove outdated comment Andreas Rheinhardt 2022-01-05 22:21 ` Marvin Scholz 2022-01-06 7:08 ` Andreas Rheinhardt [this message] 2022-01-08 13:08 ` [FFmpeg-devel] [PATCH 01/10] avcodec/mpeg12dec: Don't set write-only variable Andreas Rheinhardt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AM7PR03MB6660FA3593621E0AE150B3BF8F4C9@AM7PR03MB6660.eurprd03.prod.outlook.com \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git