diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-12-21 23:03:24 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2017-12-26 02:50:00 +0100 |
commit | 4ed66517c62c599701b3793fa2843d5a8530a4f4 (patch) | |
tree | d3cd8ed810ab76839e40708adcdfca81a80e1257 /libavcodec/internal.h | |
parent | 86a13bf2ffb40d44260d5747a4782a42a43a1ed8 (diff) | |
download | ffmpeg-streaming-4ed66517c62c599701b3793fa2843d5a8530a4f4.zip ffmpeg-streaming-4ed66517c62c599701b3793fa2843d5a8530a4f4.tar.gz |
lavc: remove complex debug code around avcodec init locking
This is just a lot of complicated and confusing code that had no purpose
anymore.
Also, the functions return values were checked only sometimes. Locking
shouldn't fail anyway, so remove the return values. Barely any other
pthread lock calls check the return value (including more important code
that is more likely to fail horribly if locking fails).
It could be argued that it might be helpful in some debugging
situations, or when the user built FFmpeg without thread support against
all good advice.
But there are dummy atomics too, so the atomic check won't help with
ensuring correctness absolutely. You gain very little.
Also, for debugging, you can just raise the ASSERT_LEVEL, and then
libavutil/thread.h will redefine the locking functions to explicitly
check the return values.
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r-- | libavcodec/internal.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 30614bb..16bd101 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -243,10 +243,6 @@ int ff_init_buffer_info(AVCodecContext *s, AVFrame *frame); void ff_color_frame(AVFrame *frame, const int color[4]); -extern volatile int ff_avcodec_locked; -int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec); -int ff_unlock_avcodec(const AVCodec *codec); - /** * Maximum size in bytes of extradata. * This value was chosen such that every bit of the buffer is |