[FFmpeg-cvslog] lavf: allow setting AVStream.discard as an AVOption
Anton Khirnov
git at videolan.org
Fri Dec 22 12:43:46 EET 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Dec 18 19:53:35 2023 +0100| [b26407ccb8e5fdd8b7263de002f7b0a44d8beb92] | committer: Anton Khirnov
lavf: allow setting AVStream.discard as an AVOption
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b26407ccb8e5fdd8b7263de002f7b0a44d8beb92
---
libavformat/options.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavformat/options.c b/libavformat/options.c
index 73e220bb7d..75ec86ce05 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -229,6 +229,16 @@ static const AVOption stream_options[] = {
{ "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" },
{ "dependent", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "disposition" },
{ "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" },
+
+ { "discard", NULL, offsetof(AVStream, discard), AV_OPT_TYPE_INT, { .i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX,
+ .flags = AV_OPT_FLAG_DECODING_PARAM, .unit = "avdiscard" },
+ { "none", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONE }, .unit = "avdiscard" },
+ { "default", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, .unit = "avdiscard" },
+ { "noref", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF }, .unit = "avdiscard" },
+ { "bidir", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR }, .unit = "avdiscard" },
+ { "nointra", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA }, .unit = "avdiscard" },
+ { "nokey", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, .unit = "avdiscard" },
+ { "all", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, .unit = "avdiscard" },
{ NULL }
};
More information about the ffmpeg-cvslog
mailing list