summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-05-22 15:59:46 +0200
committerAnton Khirnov <anton@khirnov.net>2020-11-27 15:46:50 +0100
commita83098ab03a47179d54a9b9c8bcefc81b9c6aafd (patch)
tree3f12682fa2917e3e83b4a3a6459a4be9cf51210d /fftools
parent551ca67afe7555368758c4aab476978689380a6d (diff)
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 'fftools')
-rw-r--r--fftools/ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 7a27258758..80f436eab3 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2927,7 +2927,9 @@ static int init_input_stream(int ist_index, char *error, int error_len)
ist->dec_ctx->opaque = ist;
ist->dec_ctx->get_format = get_format;
ist->dec_ctx->get_buffer2 = get_buffer;
+#if LIBAVCODEC_VERSION_MAJOR < 60
ist->dec_ctx->thread_safe_callbacks = 1;
+#endif
av_opt_set_int(ist->dec_ctx, "refcounted_frames", 1, 0);
if (ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE &&