Skip to content

Commit e452427

Browse files
committed
avcodec/avcodec: Add missing deprecation to AVCodecParser.next
The whole old next API has been deprecated in commit 7e8eba2, 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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
1 parent e96ea80 commit e452427

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libavcodec/avcodec.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3512,7 +3512,10 @@ typedef struct AVCodecParser {
35123512
const uint8_t *buf, int buf_size);
35133513
void (*parser_close)(AVCodecParserContext *s);
35143514
int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
3515+
#if FF_API_NEXT
3516+
attribute_deprecated
35153517
struct AVCodecParser *next;
3518+
#endif
35163519
} AVCodecParser;
35173520

35183521
/**

libavcodec/parsers.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ extern AVCodecParser ff_xma_parser;
7979
#include "libavcodec/parser_list.c"
8080

8181
#if FF_API_NEXT
82+
FF_DISABLE_DEPRECATION_WARNINGS
8283
static AVOnce av_parser_next_init = AV_ONCE_INIT;
8384

8485
static void av_parser_init_next(void)
@@ -106,6 +107,7 @@ void av_register_codec_parser(AVCodecParser *parser)
106107
{
107108
ff_thread_once(&av_parser_next_init, av_parser_init_next);
108109
}
110+
FF_ENABLE_DEPRECATION_WARNINGS
109111
#endif
110112

111113
const AVCodecParser *av_parser_iterate(void **opaque)

0 commit comments

Comments
 (0)