This function reads m_frames, so it needs to lock the mutex like all other function that access m_frames. Found using AddressSanitizer.