diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-02 23:17:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-25 17:18:37 +0200 |
commit | f8406ab4b9f40408f0c559fa1c0aab5ecd159970 (patch) | |
tree | 218cd525ae08fc2271deb3c01c753698d7cb0ac9 /libavcodec | |
parent | 402dbd4633a71e117ab81605b25eaadd12b198df (diff) | |
download | ffmpeg-f8406ab4b9f40408f0c559fa1c0aab5ecd159970.tar.gz |
avcodec: add max_samples
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 8 | ||||
-rw-r--r-- | libavcodec/options_table.h | 1 | ||||
-rw-r--r-- | libavcodec/version.h | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c91ee4af5b..bcb931f0dd 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3373,6 +3373,14 @@ typedef struct AVCodecContext { * - encoding: unused */ int discard_damaged_percentage; + + /** + * The number of samples per frame to maximally accept. + * + * - decoding: set by user + * - encoding: set by user + */ + int64_t max_samples; } AVCodecContext; #if FF_API_CODEC_GET_SET diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index c3a500a629..b56e653bf6 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -476,6 +476,7 @@ static const AVOption avcodec_options[] = { {"pixel_format", "set pixel format", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64=AV_PIX_FMT_NONE}, -1, INT_MAX, 0 }, {"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 }, {"max_pixels", "Maximum number of pixels", OFFSET(max_pixels), AV_OPT_TYPE_INT64, {.i64 = INT_MAX }, 0, INT_MAX, A|V|S|D|E }, +{"max_samples", "Maximum number of samples", OFFSET(max_samples), AV_OPT_TYPE_INT64, {.i64 = INT_MAX }, 0, INT_MAX, A|D|E }, {"hwaccel_flags", NULL, OFFSET(hwaccel_flags), AV_OPT_TYPE_FLAGS, {.i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, 0, UINT_MAX, V|D, "hwaccel_flags"}, {"ignore_level", "ignore level even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver", 0, AV_OPT_TYPE_CONST, { .i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, INT_MIN, INT_MAX, V | D, "hwaccel_flags" }, {"allow_high_depth", "allow to output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component", 0, AV_OPT_TYPE_CONST, {.i64 = AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH }, INT_MIN, INT_MAX, V | D, "hwaccel_flags"}, diff --git a/libavcodec/version.h b/libavcodec/version.h index 59d5758e1f..67f2a90739 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,8 +28,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 58 -#define LIBAVCODEC_VERSION_MINOR 58 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 59 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ |