]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/parser: Schedule av_parser_change for removal
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 26 Feb 2021 09:32:51 +0000 (10:32 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 6 Mar 2021 08:33:42 +0000 (09:33 +0100)
Originally deprecated in 748c2fca7e4d99357c234936aa71212a6282be36,
publically deprecated in 9a07c1332cfe092b57b5758f22b686ca58806c60
(merged into FFmpeg in 1885ffb03d0af28e6bac2bcc8725fa15b93f6ac9).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/avcodec.h
libavcodec/parser.c
libavcodec/version.h

index ecc665677a8de69a5203efc0271d282e4e5c3d58..309d9965be535643cd22317573dd7eb679f5b89a 100644 (file)
@@ -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);
 
 /**
index a63f532c48427f3510c5ea2cc7c563c6e5b99259..f4bc00da7d20db8189635b083f516cfd972ec08c 100644 (file)
@@ -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) {
index d7ccf9943e2517d57abee850a89db221696b2041..169c763e8aaaea86769d7e1bd261667fd1d420c6 100644 (file)
 #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