libobs: Start audio tracks before starting video tracks
When using multi-track audio, encoders cannot be paired like they can when only using a single audio track with video, so it has to choose the best point in the interleaved buffer as the "starting point", and if the encoders start up at different times, it has to prune that data and wait to start the output on the next video keyframe. When the audio encoders started up, there was the case where the encoders would take some time to load, and it would cause the pruning code to wait for the next keyframe to ensure startup syncing. Starting the audio encoders before starting the video encoder should reduce the possibility of that happening in a multi-track scenario.
This commit is contained in:
parent
be717dbb2c
commit
b0d88f7c1f
@ -1289,11 +1289,11 @@ static void hook_data_capture(struct obs_output *output, bool encoded,
|
||||
preserve_active(output) ? "on" : "off");
|
||||
}
|
||||
|
||||
if (has_audio)
|
||||
start_audio_encoders(output, encoded_callback);
|
||||
if (has_video)
|
||||
obs_encoder_start(output->video_encoder,
|
||||
encoded_callback, output);
|
||||
if (has_audio)
|
||||
start_audio_encoders(output, encoded_callback);
|
||||
} else {
|
||||
if (has_video)
|
||||
video_output_connect(output->video,
|
||||
|
Loading…
x
Reference in New Issue
Block a user