Skip to content

Commit

Permalink
obs-webrtc: Remove duplicate initialize calls
Browse files Browse the repository at this point in the history
`obs_output_initialize_encoders()` and can_begin_data_capture are
already being called in the `Start()` function, so these duplicate
calls serve no function.

I'm assuming they were introduced accidentally during a previous
refactor.
  • Loading branch information
tt2468 committed May 8, 2024
1 parent e92accf commit 5b51d20
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions plugins/obs-webrtc/whip-output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,12 @@ void WHIPOutput::ConfigureVideoTrack(std::string media_stream_id,
}

/**
* @brief Initialize encoders and store connect info provided by the service.
* @brief Store connect info provided by the service.
*
* @return bool
*/
bool WHIPOutput::Init()
{
if (!obs_output_can_begin_data_capture(output, 0))
return false;

if (!obs_output_initialize_encoders(output, 0))
return false;

obs_service_t *service = obs_output_get_service(output);
if (!service) {
obs_output_signal_stop(output, OBS_OUTPUT_ERROR);
Expand Down

0 comments on commit 5b51d20

Please sign in to comment.