Fix race condition in mlt_consumer_stop().