mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/parsers: add missing FF_API_NEXT wrappers
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
fe9bc1cc45
commit
1ad554a00b
@ -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);
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user