History

avcodec: Make init-threadsafety the default

and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state.

Andreas Rheinhardt committed 4 years ago

Commit 21b23ce1 parent 6aad120407 files · +243 −572Browse files

Showing the changes to libavcodec/codec_internal.h (1 of 407 files). Show all

Unified · Split

libavcodec/codec_internal.h+1−6
@@ -24,18 +24,13 @@ · 23 unmodified lines
2424 #include "libavutil/attributes.h"
2525 #include "codec.h"
2626
27−/**
28− * The codec does not modify any global variables in the init function,
29− * allowing to call the init function without locking any global mutexes.
30− */
31−#define FF_CODEC_CAP_INIT_THREADSAFE (1 << 0)
3227 /**
3328 * The codec is not known to be init-threadsafe (i.e. it might be unsafe
3429 * to initialize this codec and another codec concurrently, typically because
3530 * the codec calls external APIs that are not known to be thread-safe).
3631 * Therefore calling the codec's init function needs to be guarded with a lock.
3732 */
38−#define FF_CODEC_CAP_NOT_INIT_THREADSAFE (1 << 9)
33+#define FF_CODEC_CAP_NOT_INIT_THREADSAFE (1 << 0)
3934 /**
4035 * The codec allows calling the close function for deallocation even if
4136 * the init function returned a failure. Without this capability flag, a

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t