Because the local locking IsValid does not help to prevent segfaults if you call Close at the decoder stage that cleans up all resources. Calling Process after IsValid is dangerous thats why the entire clean up procedure is guarded with Enter/Leave as well as rendering.