Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2015-03-26 01:24:30 +0300
committerPhilip Langdale <philipl@overt.org>2015-03-26 01:32:09 +0300
commit21adb9964e2a6160006412d2b85c02b9ce588f25 (patch)
treeb693e89887727bbede4146c5c2a73e1649b547b9 /libavcodec
parent9f91c5198f17569df98698318fd5945a6ab8b8d5 (diff)
avcodec/nvenc: Need a separate class for each encoder
The encoders can't share a class instance. Signed-off-by: Philip Langdale <philipl@overt.org>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/nvenc.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 8194974834..78b52530a0 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1264,13 +1264,6 @@ static const AVOption options[] = {
{ NULL }
};
-static const AVClass nvenc_class = {
- .class_name = "nvenc",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
static const AVCodecDefault nvenc_defaults[] = {
{ "b", "0" },
{ "qmin", "-1" },
@@ -1282,6 +1275,13 @@ static const AVCodecDefault nvenc_defaults[] = {
};
#if CONFIG_NVENC_ENCODER
+static const AVClass nvenc_class = {
+ .class_name = "nvenc",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
AVCodec ff_nvenc_encoder = {
.name = "nvenc",
.long_name = NULL_IF_CONFIG_SMALL("Nvidia NVENC h264 encoder"),
@@ -1299,6 +1299,13 @@ AVCodec ff_nvenc_encoder = {
#endif
#if CONFIG_NVENC_H265_ENCODER
+static const AVClass nvenc_h265_class = {
+ .class_name = "nvenc_h265",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
AVCodec ff_nvenc_h265_encoder = {
.name = "nvenc_h265",
.long_name = NULL_IF_CONFIG_SMALL("Nvidia NVENC h265 encoder"),
@@ -1309,7 +1316,7 @@ AVCodec ff_nvenc_h265_encoder = {
.encode2 = nvenc_encode_frame,
.close = nvenc_encode_close,
.capabilities = CODEC_CAP_DELAY,
- .priv_class = &nvenc_class,
+ .priv_class = &nvenc_h265_class,
.defaults = nvenc_defaults,
.pix_fmts = pix_fmts_nvenc,
};