diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-26 10:42:02 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:07 -0300 |
commit | f34521266ec5816eefa4c10db6098cb91e03c695 (patch) | |
tree | ca7c2770db20f09b53b1577ecaa1f7c85f438487 /libavcodec/parser.c | |
parent | e1e975869dfd6f77f606e0ad00006432d3fc8af7 (diff) |
avcodec/parser: Remove deprecated av_parser_change
Deprecated in 9a07c1332cfe092b57b5758f22b686ca58806c60.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r-- | libavcodec/parser.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 08b9945a57..593ea9ddf7 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -184,42 +184,6 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, return index; } -#if FF_API_PARSER_CHANGE -int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, int keyframe) -{ - if (s && s->parser->split) { - if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER || - avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER) { - int i = s->parser->split(avctx, buf, buf_size); - buf += i; - buf_size -= i; - } - } - - /* cast to avoid warning about discarding qualifiers */ - *poutbuf = (uint8_t *) buf; - *poutbuf_size = buf_size; - if (avctx->extradata) { - if (keyframe && (avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER)) { - int size = buf_size + avctx->extradata_size; - - *poutbuf_size = size; - *poutbuf = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE); - if (!*poutbuf) - return AVERROR(ENOMEM); - - memcpy(*poutbuf, avctx->extradata, avctx->extradata_size); - memcpy(*poutbuf + avctx->extradata_size, buf, - buf_size + AV_INPUT_BUFFER_PADDING_SIZE); - return 1; - } - } - - return 0; -} -#endif void av_parser_close(AVCodecParserContext *s) { if (s) { |