summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/avcodec.h6
-rw-r--r--libavcodec/parser.c3
-rw-r--r--libavcodec/version.h3
3 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ecc665677a..309d9965be 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3576,14 +3576,18 @@ int av_parser_parse2(AVCodecParserContext *s,
int64_t pts, int64_t dts,
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 AVBitStreamFilter
+ * @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);
/**
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index a63f532c48..f4bc00da7d 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -186,6 +186,7 @@ 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)
@@ -220,7 +221,7 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
return 0;
}
-
+#endif
void av_parser_close(AVCodecParserContext *s)
{
if (s) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index d7ccf9943e..169c763e8a 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -150,6 +150,9 @@
#ifndef FF_API_MPV_RC_STRATEGY
#define FF_API_MPV_RC_STRATEGY (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
+#ifndef FF_API_PARSER_CHANGE
+#define FF_API_PARSER_CHANGE (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
#ifndef FF_API_THREAD_SAFE_CALLBACKS
#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
#endif