]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Remove wrong test in nvenc.c
authorFlole998 <Flole998@users.noreply.github.com>
Thu, 8 Oct 2020 20:45:58 +0000 (22:45 +0200)
committerGitHub <noreply@github.com>
Thu, 8 Oct 2020 20:45:58 +0000 (22:45 +0200)
As proposed in #1362

src/transcoding/codec/codecs/libs/nvenc.c

index b509e08f46c7dcd38d92ae0dd5feb44f869508f1..0a3c6d4b3b3b9f1df1d3f42877ca590d17492a92 100644 (file)
@@ -268,7 +268,7 @@ tvh_codec_profile_nvenc_h264_open(tvh_codec_profile_nvenc_t *self,
 
     if (self->nvenc_profile != FF_PROFILE_UNKNOWN &&
         (s = val2str(self->nvenc_profile, profiletab)) != NULL)
-      AV_DICT_SET(opts, "profile", (s - 1), 0);
+      AV_DICT_SET(opts, "profile", s, 0);
     return 0;
 }
 
@@ -316,7 +316,7 @@ tvh_codec_profile_nvenc_hevc_open(tvh_codec_profile_nvenc_t *self,
 
     if (self->nvenc_profile != FF_PROFILE_UNKNOWN &&
         (s = val2str(self->nvenc_profile, profiletab)) != NULL)
-      AV_DICT_SET(opts, "profile", (s - 1), 0);
+      AV_DICT_SET(opts, "profile", s, 0);
     AV_DICT_SET_INT(opts, "bf", 0, 0);
     return 0;
 }