You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// important: if "tune" is not supported, then FALLBACK_NVENC_PRESET must be used (it is correlated). If unsupported preset
1828
1829
// were given, setting would succeed but would cause runtime errors.
1829
-
if (int rc = av_opt_set(codec_ctx->priv_data, "tune", DEFAULT_NVENC_TUNE, 0)) {
1830
-
array<char, LIBAV_ERRBUF_LEN> errbuf{};
1831
-
av_strerror(rc, errbuf.data(), errbuf.size());
1832
-
LOG(LOG_LEVEL_WARNING) << "[lavc] Cannot set NVENC tune to \"" << DEFAULT_NVENC_TUNE << "\" (" << errbuf.data() << "). Possibly old libavcodec or compiled with old NVIDIA NVENC headers.\n";
1830
+
if (!check_av_opt_set<constchar *>(codec_ctx->priv_data, "tune", DEFAULT_NVENC_TUNE, "NVENC tune")) {
1831
+
LOG(LOG_LEVEL_WARNING) << MOD_NAME "Possibly old libavcodec or compiled with old NVIDIA NVENC headers.\n";
1833
1832
preset = FALLBACK_NVENC_PRESET;
1834
1833
}
1835
1834
if (!param->have_preset) {
1836
-
if (int rc = av_opt_set(codec_ctx->priv_data, "preset", preset, 0)) {
1837
-
array<char, LIBAV_ERRBUF_LEN> errbuf{};
1838
-
av_strerror(rc, errbuf.data(), errbuf.size());
1839
-
LOG(LOG_LEVEL_WARNING) << "[lavc] Cannot set NVENC preset to: " << preset << " (" << errbuf.data() << ").\n";
0 commit comments