opdenkamp/xbmc — comment on commit 52af67a03b0288cf1a318012c1e0fd4b23030235
File:  line 0
By elupus:

The latter would work sort of. But the point is to just calculate a
bool and put in m_State.

Calling into input stream from gui thread could risk it waiting on a
lock that is held during read from input stream. Such locks could be
held for a long time (several frames). Thus gui thread should never
touch inputstream or demuxers.

m_State is a buffer which is periodically updated by dvdplayer thread
for use in externally facing functions. The lock on that is held for a
minimum amount of time it takes to do a memcpy from one such state
structure to another.