]> git.sesse.net Git - vlc/commit
iomx-dr: split IOMXHWBuffer_Setup function
authorThomas Guillem <guillem@archos.com>
Fri, 25 Jul 2014 14:58:54 +0000 (16:58 +0200)
committerMartin Storsjö <martin@martin.st>
Sat, 26 Jul 2014 11:00:09 +0000 (14:00 +0300)
commitef230f418ff63cce58be09eb4ce1f235ac624676
tree770d6ba9a83ac974b460d3cc52129c64f5f642b4
parentf9182874b2235acea94ef634552188edc80b2df8
iomx-dr: split IOMXHWBuffer_Setup function

In HwBuffer, split Setup into Setup, GetMinUndequeued and SetBufferCount since
we want to control the buffer count logic from omxil.c.

Some OMX components (like OMX.TI.*.Decoder) may have nBufferCountActual that is
greater than nBufferCountMin + min_undequeued. In that case we decreased the
number of buffer wanted by the component and had an undefined behavior.

In order to fix it, we need to increase nBufferCountActual value from the
component only when it's smaller than nBufferCountMin + min_undequeued.

Signed-off-by: Martin Storsjö <martin@martin.st>
modules/codec/omxil/iomx_hwbuffer.c
modules/codec/omxil/omxil.c
modules/codec/omxil/omxil_core.c
modules/codec/omxil/omxil_core.h