[FFmpeg-devel] [PATCH 2/6] Deprecate avcodec_thread_init()

Aurelien Jacobs aurel
Wed Nov 17 23:52:03 CET 2010


On Mon, Nov 15, 2010 at 08:37:02AM -0500, Alexander Strange wrote:
> As a side effect of the last commit, avcodec_open() now calls it automatically,
> so there is no longer any need for clients to call it.
> Instead they should set AVCodecContext.thread_count.
> 
> avcodec_thread_free() will be removed from avcodec.h at the same time; there
> is no need to mark it deprecated as clients already had no reason to call it.
> 
> [...]
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index e35e77d..afa2440 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -3544,8 +3544,14 @@ int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h);
>  
>  enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
>  
> +#if LIBAVCODEC_VERSION_MAJOR < 53

Please define a FF_API_THREAD_OLD at the begining of avcodec.h and use
it instead of using directly LIBAVCODEC_VERSION_MAJOR.

Aurel



More information about the ffmpeg-devel mailing list