[libav-devel] [PATCH 032/264] lavf: deprecate the stream codec context

Anton Khirnov anton at khirnov.net
Sat Dec 12 21:49:05 CET 2015


---
 libavformat/avformat.h | 13 ++++---------
 libavformat/version.h  |  3 +++
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 8f730de..d35675c 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -705,18 +705,13 @@ typedef struct AVStream {
      * encoding: set by the user, replaced by libavformat if left unset
      */
     int id;
+#if FF_API_LAVF_AVCTX
     /**
-     * Codec context associated with this stream. Allocated and freed by
-     * libavformat.
-     *
-     * - decoding: The demuxer exports codec information stored in the headers
-     *             here.
-     * - encoding: The user sets codec information, the muxer writes it to the
-     *             output. Mandatory fields as specified in AVCodecContext
-     *             documentation must be set even if this AVCodecContext is
-     *             not actually used for encoding.
+     * @deprecated use the codecpar struct instead
      */
+    attribute_deprecated
     AVCodecContext *codec;
+#endif
     void *priv_data;
 
 #if FF_API_LAVF_FRAC
diff --git a/libavformat/version.h b/libavformat/version.h
index e29e4eb..1eda4a3 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -63,5 +63,8 @@
 #ifndef FF_API_COMPUTE_PKT_FIELDS2
 #define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 58)
 #endif
+#ifndef FF_API_LAVF_AVCTX
+#define FF_API_LAVF_AVCTX               (LIBAVFORMAT_VERSION_MAJOR < 58)
+#endif
 
 #endif /* AVFORMAT_VERSION_H */
-- 
2.0.0



More information about the libav-devel mailing list