diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-05-22 15:59:46 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-11-27 15:46:50 +0100 |
commit | a83098ab03a47179d54a9b9c8bcefc81b9c6aafd (patch) | |
tree | 3f12682fa2917e3e83b4a3a6459a4be9cf51210d /libavcodec/thread.h | |
parent | 551ca67afe7555368758c4aab476978689380a6d (diff) | |
download | ffmpeg-a83098ab03a47179d54a9b9c8bcefc81b9c6aafd.tar.gz |
avcodec: deprecate thread_safe_callbacks
They add considerable complexity to frame-threading implementation,
which includes an unavoidably leaking error path, while the advantages
of this option to the users are highly dubious.
It should be always possible and desirable for the callers to make their
get_buffer2() implementation thread-safe, so deprecate this option.
Diffstat (limited to 'libavcodec/thread.h')
-rw-r--r-- | libavcodec/thread.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/thread.h b/libavcodec/thread.h index 87bf154da9..413196269f 100644 --- a/libavcodec/thread.h +++ b/libavcodec/thread.h @@ -96,6 +96,7 @@ void ff_thread_report_progress(ThreadFrame *f, int progress, int field); */ void ff_thread_await_progress(ThreadFrame *f, int progress, int field); +#if FF_API_THREAD_SAFE_CALLBACKS /** * Wrapper around get_format() for frame-multithreaded codecs. * Call this function instead of avctx->get_format(). @@ -105,6 +106,9 @@ void ff_thread_await_progress(ThreadFrame *f, int progress, int field); * @param fmt The list of available formats. */ enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt); +#else +#define ff_thread_get_format ff_get_format +#endif /** * Wrapper around get_buffer() for frame-multithreaded codecs. |