diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-16 00:48:38 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-16 00:48:38 +0100 |
commit | 22c76fb8c3ea3424c9af23feecf26996b9771a25 (patch) | |
tree | 2d1de155a39e5a6b4eb73105870ba4cbe8a1996b /src/main.cpp | |
parent | 77b60a03b2785fa8ce461069f2ba2f241c2a1557 (diff) |
Ffmpeg changes the api YET AGAIN, breaking recording on nvidia
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3c5ea85..5669d17 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -777,7 +777,7 @@ static void dict_set_profile(AVCodecContext *codec_context, gsr_gpu_vendor vendo //if(color_depth == GSR_COLOR_DEPTH_10_BITS) // av_dict_set_int(options, "profile", AV_PROFILE_H264_HIGH_10, 0); //else - av_dict_set_int(options, "profile", AV_PROFILE_H264_HIGH, 0); + av_dict_set_int(options, "profile", vendor == GSR_GPU_VENDOR_NVIDIA ? 2 : AV_PROFILE_H264_HIGH, 0); } else if(codec_context->codec_id == AV_CODEC_ID_AV1) { if(vendor == GSR_GPU_VENDOR_NVIDIA) { if(color_depth == GSR_COLOR_DEPTH_10_BITS) @@ -787,9 +787,9 @@ static void dict_set_profile(AVCodecContext *codec_context, gsr_gpu_vendor vendo } } else if(codec_context->codec_id == AV_CODEC_ID_HEVC) { if(color_depth == GSR_COLOR_DEPTH_10_BITS) - av_dict_set_int(options, "profile", AV_PROFILE_HEVC_MAIN_10, 0); + av_dict_set_int(options, "profile", vendor == GSR_GPU_VENDOR_NVIDIA ? 1 : AV_PROFILE_HEVC_MAIN_10, 0); else - av_dict_set_int(options, "profile", AV_PROFILE_HEVC_MAIN, 0); + av_dict_set_int(options, "profile", vendor == GSR_GPU_VENDOR_NVIDIA ? 0 : AV_PROFILE_HEVC_MAIN, 0); } #endif } |