Fix some threading problems in obs-ffmpeg-source