Skip to content

Commit

Permalink
obs-webrtc: Default H264 profile to main if unset
Browse files Browse the repository at this point in the history
If user requests a specific H264 profile respect it, otherwise default
to main.
  • Loading branch information
Sean-Der committed Jun 11, 2024
1 parent 14fa71f commit aea1007
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/obs-webrtc/whip-service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ void WHIPService::ApplyEncoderSettings(obs_data_t *video_settings, obs_data_t *)
if (video_settings) {
obs_data_set_int(video_settings, "bf", 0);
obs_data_set_bool(video_settings, "repeat_headers", true);

const char *profile =
obs_data_get_string(video_settings, "profile");
if (profile == nullptr || profile[0] == '\0') {
obs_data_set_string(video_settings, "profile", "main");
blog(LOG_INFO,
"[obs-webrtc] no H264 profile set, default to main");
}
}
}

Expand Down

0 comments on commit aea1007

Please sign in to comment.