[FFmpeg-devel] [PATCH 4/4] avcodec/avcodec: Add missing deprecation to AVCodecParser.next

James Almer jamrial at gmail.com
Thu Feb 25 16:13:34 EET 2021


On 2/25/2021 11:05 AM, Andreas Rheinhardt wrote:
> The whole old next API has been deprecated in commit
> 7e8eba2d8755962d9dca5eade57bf8f591a73c0c, yet deprecating the next
> pointer has been forgotten (the next pointers of other structures are
> below the public API delimiter, but such a delimiter doesn't exist for
> AVCodecParser).
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>   libavcodec/avcodec.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 5df6a8aedc..b0cb91f555 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -3512,7 +3512,10 @@ typedef struct AVCodecParser {
>                           const uint8_t *buf, int buf_size);
>       void (*parser_close)(AVCodecParserContext *s);
>       int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
> +#if FF_API_NEXT
> +attribute_deprecated

Adding this will make parsers.c start printing deprecation warnings. Can 
you add the FF_{ENABLE,DISABLE}_DEPRECATION_WARNINGS wrappers there 
while at it?

>       struct AVCodecParser *next;
> +#endif
>   } AVCodecParser;
>   
>   /**
> 



More information about the ffmpeg-devel mailing list