Cover the whole conditioning with the lock,
because otherwise two threads competing on execution
can suddenly come across the `(m_playout_type != type)` getting
true (for both) and one of them by acquiring the lock can potentially
manage to modify that, what can actually make `(m_playout_type != type)`
not true anymore for the other thread in race condition here.
Change-Id: Ie352da10a515837efc696063837b70dc2c9a304d