[FFmpeg-devel,v10,13/14] avformat/utils: Add av_stream_get_codec_properties()

Message ID MN2PR04MB5981A50353FADC4B32101022BAAA9@MN2PR04MB5981.namprd04.prod.outlook.com
State Withdrawn, archived
Headers
Series [FFmpeg-devel,v10,01/14] fftools/play, probe: Adjust for subtitle changes |

Commit Message

Soft Works Sept. 30, 2021, 7:31 p.m. UTC
Signed-off-by: softworkz <softworkz@hotmail.com>
---
 doc/APIchanges         | 3 +++
 libavformat/avformat.h | 9 +++++++++
 libavformat/utils.c    | 5 +++++
 libavformat/version.h  | 2 +-
 4 files changed, 18 insertions(+), 1 deletion(-)
  

Patch

diff --git a/doc/APIchanges b/doc/APIchanges
index 7b267a79ac..20848fe93f 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -14,6 +14,9 @@  libavutil:     2021-04-27
 
 API changes, most recent first:
 
+2021-04-27 - xxxxxxxxxx - lavf 59.6.100 - avformat.h
+  Add av_stream_get_codec_properties()
+  
 2021-09-21 - xxxxxxxxxx - lavu 57.7.100 - pixfmt.h
   Add AV_PIX_FMT_X2BGR10.
 
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3a5bc8a06d..89ed984d1d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2763,6 +2763,15 @@  int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
  */
 AVRational av_stream_get_codec_timebase(const AVStream *st);
 
+/**
+ * Get the internal codec properties from a stream.
+ *
+ * See @ref AVCodecContext.properties.
+ *
+ * @param st  input stream to extract the timebase from
+ */
+unsigned av_stream_get_codec_properties(const AVStream *st);
+
 /**
  * @}
  */
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f1ec4c4c2f..64b90e785d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1945,6 +1945,11 @@  AVRational av_stream_get_codec_timebase(const AVStream *st)
     return cffstream(st)->avctx->time_base;
 }
 
+unsigned av_stream_get_codec_properties(const AVStream *st)
+{
+    return cffstream(st)->avctx->properties;
+}
+
 void ff_format_set_url(AVFormatContext *s, char *url)
 {
     av_assert0(url);
diff --git a/libavformat/version.h b/libavformat/version.h
index 13df244d97..d5dd22059b 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -32,7 +32,7 @@ 
 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
 // Also please add any ticket numbers that you believe might be affected here
 #define LIBAVFORMAT_VERSION_MAJOR  59
-#define LIBAVFORMAT_VERSION_MINOR   5
+#define LIBAVFORMAT_VERSION_MINOR   6
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \