xbmc/xbmc — comment on commit 6922560658abeaddfb86e897f1152dd268272376
File:  line 0
By davilla:

One thing I've just noticed with getting an hw decoder working is that GetLevel for the message queues can report zero when there is actually remaining bytes. The situation is if GetLevel is using the data based calc and not the time based calc, it returns the min of 100 or '100 * m_iDataSize / m_iMaxDataSize', this is a truncation and and anything less than 1 percent is basically truncated to zero. Even rounding is not right here. It should always return 1 percent until m_iDataSize is really zero or change the return of an int to return a float/double...

I also have a patch that extends the message queue GetLevel that DVDPlayerVideo/DVDPlayerAudio uses into the codec so any demux data that is passed into codecs but has NOT been consumed will contribute to the GetLevel calc. Still thinking about it.