record: Make sure we also finalise streams that didn't even start
If there's no encoder it's because it was never activated so we won't get the state change callback.
I'd only cherry-pick the first commit.
If there's no encoder it's because it was never activated so we won't get the state change callback.
I'd only cherry-pick the first commit.