Keep vidbin state locked to avoid it going to playing without being used and leaving an empty file created. Check the docs on the code for details on the handling.