[FFmpeg-devel] [PATCH v2 1/2] avcodec/codec_par: Add codec properties field to AVCodecParameters
Soft Works
softworkz at hotmail.com
Wed Oct 6 05:09:47 EEST 2021
Signed-off-by: softworkz <softworkz at hotmail.com>
---
v2: include codec properties in AVCodecParameters instead of adding an API to retrieve it
doc/APIchanges | 3 +++
libavcodec/codec_par.c | 2 ++
libavcodec/codec_par.h | 4 ++++
libavcodec/version.h | 2 +-
4 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 7b267a79ac..2be3303efa 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -14,6 +14,9 @@ libavutil: 2021-04-27
API changes, most recent first:
+2021-10-07 - xxxxxxxxxx - lavc 59.11.100 - codec_par.h
+ Add codec properties field to AVCodecParameters
+
2021-09-21 - xxxxxxxxxx - lavu 57.7.100 - pixfmt.h
Add AV_PIX_FMT_X2BGR10.
diff --git a/libavcodec/codec_par.c b/libavcodec/codec_par.c
index 1a5168a04b..f6c13f7d11 100644
--- a/libavcodec/codec_par.c
+++ b/libavcodec/codec_par.c
@@ -101,6 +101,7 @@ int avcodec_parameters_from_context(AVCodecParameters *par,
par->bits_per_raw_sample = codec->bits_per_raw_sample;
par->profile = codec->profile;
par->level = codec->level;
+ par->properties = codec->properties;
switch (par->codec_type) {
case AVMEDIA_TYPE_VIDEO:
@@ -156,6 +157,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
codec->bits_per_raw_sample = par->bits_per_raw_sample;
codec->profile = par->profile;
codec->level = par->level;
+ codec->properties = par->properties;
switch (par->codec_type) {
case AVMEDIA_TYPE_VIDEO:
diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h
index 10cf79dff1..42ed8deb13 100644
--- a/libavcodec/codec_par.h
+++ b/libavcodec/codec_par.h
@@ -198,6 +198,10 @@ typedef struct AVCodecParameters {
* Audio only. Number of samples to skip after a discontinuity.
*/
int seek_preroll;
+ /**
+ * Codec properties of the stream that gets decoded
+ */
+ unsigned properties;
} AVCodecParameters;
/**
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 4bd22f7e93..1c28fd0be5 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 59
-#define LIBAVCODEC_VERSION_MINOR 10
+#define LIBAVCODEC_VERSION_MINOR 11
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--
2.30.2.windows.1
More information about the ffmpeg-devel
mailing list