提交 b0d88f7c 编写于 作者: J jp9000

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.
上级 be717dbb
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册