diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-27 03:12:01 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-04 17:46:46 +0300 |
commit | 5766c8e968d17781c9e3c8f8d3676359457fe987 (patch) | |
tree | 03cde6fc9fc8cfd9486cc8d3636506b3592d749b /libavcodec/utils.c | |
parent | 1d2d91d1cfbd3fe31b1fbf84822aca5bc8187ac6 (diff) |
avcodec/utils: Remove ff_codec_open2_recursive()
This function existed to enable codecs with non-threadsafe init functions
to initialize other codecs despite the fact that normally no two codecs
with non-threadsafe init functions can be initialized at the same time
(there is a mutex guarding this). Yet there are no users of this
function any more as all users have been made thread-safe (switching
away from ff_codec_open2_recursive() was required for this as said
function requires the caller to hold the lock to the mutex guarding the
initializations and this is only true for codecs with the
FF_CODEC_CAP_INIT_THREADSAFE flag unset); so remove it.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 45295dd3ce..0226e36ee7 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -535,18 +535,6 @@ static void ff_unlock_avcodec(const AVCodec *codec) ff_mutex_unlock(&codec_mutex); } -int attribute_align_arg ff_codec_open2_recursive(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) -{ - int ret = 0; - - ff_unlock_avcodec(codec); - - ret = avcodec_open2(avctx, codec, options); - - ff_lock_avcodec(avctx, codec); - return ret; -} - int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) { int ret = 0; |