Lock the various stream context to prevent racing conditions.

SeekReset was called in player thread, which would reset the av streams, while sometimes in the middle of usage in the decoder thread.

Fixes #11705