diff options
author | James Almer <jamrial@gmail.com> | 2020-10-10 01:12:01 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-10-10 01:15:49 -0300 |
commit | 1ad554a00b4df43605cc4d74b781aec0711afc20 (patch) | |
tree | 65501792f31efbe0b9b15a33d382f59effdba1b6 | |
parent | fe9bc1cc45e2bebba1efa7b9a20b0d66679bf2d5 (diff) | |
download | ffmpeg-1ad554a00b4df43605cc4d74b781aec0711afc20.tar.gz |
avcodec/parsers: add missing FF_API_NEXT wrappers
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/avcodec.h | 2 | ||||
-rw-r--r-- | libavcodec/parsers.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c91b2fd169..20af3ef00d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3543,11 +3543,13 @@ typedef struct AVCodecParser { */ const AVCodecParser *av_parser_iterate(void **opaque); +#if FF_API_NEXT attribute_deprecated AVCodecParser *av_parser_next(const AVCodecParser *c); attribute_deprecated void av_register_codec_parser(AVCodecParser *parser); +#endif AVCodecParserContext *av_parser_init(int codec_id); /** diff --git a/libavcodec/parsers.c b/libavcodec/parsers.c index 74ea4de6c3..83271d95a3 100644 --- a/libavcodec/parsers.c +++ b/libavcodec/parsers.c @@ -21,6 +21,7 @@ #include "libavutil/thread.h" #include "avcodec.h" +#include "version.h" extern AVCodecParser ff_aac_parser; extern AVCodecParser ff_aac_latm_parser; @@ -74,6 +75,7 @@ extern AVCodecParser ff_xma_parser; #include "libavcodec/parser_list.c" +#if FF_API_NEXT static AVOnce av_parser_next_init = AV_ONCE_INIT; static void av_parser_init_next(void) @@ -97,6 +99,12 @@ AVCodecParser *av_parser_next(const AVCodecParser *p) return (AVCodecParser*)parser_list[0]; } +void av_register_codec_parser(AVCodecParser *parser) +{ + ff_thread_once(&av_parser_next_init, av_parser_init_next); +} +#endif + const AVCodecParser *av_parser_iterate(void **opaque) { uintptr_t i = (uintptr_t)*opaque; @@ -107,8 +115,3 @@ const AVCodecParser *av_parser_iterate(void **opaque) return p; } - -void av_register_codec_parser(AVCodecParser *parser) -{ - ff_thread_once(&av_parser_next_init, av_parser_init_next); -} |