xbmc/xbmc — pull request #3444 by popcornmix (2013-10-16 19:03:44+00:00)
Title: [rbp/omxplayer] Add high level locking to OMXVideo

Finally tracked down the long term bug where channel changes sometimes just produce a black screen.
When changing channel we get a couple of open/close cycles as parameters in the hints get updated (e.g. video profile/level)
These are interleaved with decoding of frames from a different thread.
If the components are shut down while a packet is being submitted, we naturally get an OMX error, and playback stalls until another channel change.

OMXAudio already uses a critical section lock. OMXVideo should also do too.