You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/parser: Remove deprecated av_parser_change
Deprecated in 9a07c1332c
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
committed by
James Almer
parent
e1e975869d
commit
f34521266e
@@ -3276,18 +3276,6 @@ int av_parser_parse2(AVCodecParserContext *s,
|
|||||||
int64_t pts, int64_t dts,
|
int64_t pts, int64_t dts,
|
||||||
int64_t pos);
|
int64_t pos);
|
||||||
|
|
||||||
#if FF_API_PARSER_CHANGE
|
|
||||||
/**
|
|
||||||
* @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
|
|
||||||
* @deprecated Use dump_extradata, remove_extra or extract_extradata
|
|
||||||
* bitstream filters instead.
|
|
||||||
*/
|
|
||||||
attribute_deprecated
|
|
||||||
int av_parser_change(AVCodecParserContext *s,
|
|
||||||
AVCodecContext *avctx,
|
|
||||||
uint8_t **poutbuf, int *poutbuf_size,
|
|
||||||
const uint8_t *buf, int buf_size, int keyframe);
|
|
||||||
#endif
|
|
||||||
void av_parser_close(AVCodecParserContext *s);
|
void av_parser_close(AVCodecParserContext *s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -184,42 +184,6 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx,
|
|||||||
return index;
|
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)
|
void av_parser_close(AVCodecParserContext *s)
|
||||||
{
|
{
|
||||||
if (s) {
|
if (s) {
|
||||||
|
@@ -69,9 +69,6 @@
|
|||||||
#ifndef FF_API_OLD_ENCDEC
|
#ifndef FF_API_OLD_ENCDEC
|
||||||
#define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59)
|
#define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||||
#endif
|
#endif
|
||||||
#ifndef FF_API_PARSER_CHANGE
|
|
||||||
#define FF_API_PARSER_CHANGE (LIBAVCODEC_VERSION_MAJOR < 59)
|
|
||||||
#endif
|
|
||||||
#ifndef FF_API_THREAD_SAFE_CALLBACKS
|
#ifndef FF_API_THREAD_SAFE_CALLBACKS
|
||||||
#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
|
#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user