Currently StreamRecorder never calls _encoder.init() when recording both video and audio tracks. Specifically, StreamRecorder expects one of the booleans to be true and the other to be false exactly once so that it can call the init function, however in my observations both values start as true then both flip to false.
This PR separates out the init logic from _awaitingVideo and _awaitingAudio to call init exactly once.
Currently
StreamRecorder
never calls_encoder.init()
when recording both video and audio tracks. Specifically,StreamRecorder
expects one of the booleans to be true and the other to be false exactly once so that it can call theinit
function, however in my observations both values start as true then both flip to false.This PR separates out the init logic from
_awaitingVideo
and_awaitingAudio
to callinit
exactly once.