[FFmpeg-cvslog] avcodec/parsers: add missing FF_API_NEXT wrappers
James Almer
git at videolan.org
Sat Oct 10 07:18:10 EEST 2020
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Oct 10 01:12:01 2020 -0300| [1ad554a00b4df43605cc4d74b781aec0711afc20] | committer: James Almer
avcodec/parsers: add missing FF_API_NEXT wrappers
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ad554a00b4df43605cc4d74b781aec0711afc20
---
libavcodec/avcodec.h | 2 ++
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);
-}
More information about the ffmpeg-cvslog
mailing list