[FFmpeg-devel] [PATCH] avcodec: deprecate thread_safe_callbacks

Moritz Barsnick barsnick at gmx.net
Tue Aug 11 00:14:59 EEST 2020


On Tue, Aug 04, 2020 at 13:59:42 +0200, Anton Khirnov wrote:
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -2883,7 +2883,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 < 59
>          ist->dec_ctx->thread_safe_callbacks = 1;
> +#endif

Wouldn't this be
#if FF_API_THREAD_SAFE_CALLBACKS
?

Seems more logical.

(I can't find more than one use of either FF_API_* or LIBAV*_VERSION_*
in ffmpeg.c.)

Moritz


More information about the ffmpeg-devel mailing list