]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/avcodec: Add missing deprecation to AVCodecParser.next
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 25 Feb 2021 00:45:11 +0000 (01:45 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 25 Feb 2021 20:51:11 +0000 (21:51 +0100)
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).

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/avcodec.h
libavcodec/parsers.c

index ddca770cc425d85028b7a1095ecfccaa8f27f33f..3d77d2f6fd88d8af84cb657a001b28e59a5a2b7d 100644 (file)
@@ -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
     struct AVCodecParser *next;
+#endif
 } AVCodecParser;
 
 /**
index f8cfa1cde9021f23388bb866a6c16bcfa35874df..3d944f5222ec0789639380384afe07528d6bb45d 100644 (file)
@@ -79,6 +79,7 @@ extern AVCodecParser ff_xma_parser;
 #include "libavcodec/parser_list.c"
 
 #if FF_API_NEXT
+FF_DISABLE_DEPRECATION_WARNINGS
 static AVOnce av_parser_next_init = AV_ONCE_INIT;
 
 static void av_parser_init_next(void)
@@ -106,6 +107,7 @@ void av_register_codec_parser(AVCodecParser *parser)
 {
     ff_thread_once(&av_parser_next_init, av_parser_init_next);
 }
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
 const AVCodecParser *av_parser_iterate(void **opaque)