Slightly reduce lock usage
Slightly reduce lock usage

Locking the frame_buffer mutex to reference the input frame into the
tmp_frame is unnecessary.

This also fixes the missing unlock on error.

Genymobile/scrcpy,Genymobile/scrcpy,Genymobile/scrcpy