Share

Bellagio OpenMAX Integration Layer

Tracker: Bugs

5 passing empty buffers from omx_base_sink_BufferMgmtFunction - ID: 2791158
Last Update: Settings changed ( gsent )

According to current implementation of omx_base_sink_BufferMgmtFunction,
when the empty input buffer is processed (nFIlledLen==0) then
BufferMgmtCallback is not called.

Probably, it is all right most of the time (especially at worming up), but
it becomes an issue when a component sourcing the buffer passes EOS in
separate empty buffer. In result, my custom sink's BufferMgmtCallback never
receives a buffer with EOS, so it is not aware that the buffered data
should be sent immediately to hardware (as it might be accumulated in the
driver).

Possible solution - in omx_base_sink_BufferMgmtFunction replace as
follows:
<code>
if (omx_base_sink_Private->BufferMgmtCallback &&
pInputBuffer->nFilledLen > 0) {
(*(omx_base_sink_Private->BufferMgmtCallback))(openmaxStandComp,
pInputBuffer);
}
</code>
With:
<code>
if (omx_base_sink_Private->BufferMgmtCallback && (
(pInputBuffer->nFilledLen > 0) || (pInputBuffer->nFlags) ){
(*(omx_base_sink_Private->BufferMgmtCallback))(openmaxStandComp,
pInputBuffer);
}
</code>


Maciej Jablonski ( mafj ) - 2009-05-13 12:52

5

Closed

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2009-11-03 15:31
Sender: gsentProject Admin

The suggestion has been applied to the code and included in the 0.9.2


Date: 2009-05-27 07:55
Sender: gsentProject Admin

The proposed solution has been adopted.
This bug will be closed after further testing


Date: 2009-05-13 13:10
Sender: mafj

Actually, it seems that EOS flag in nFlags is always cleared before calling
BufferMgmtCallback, so
possibly the buffer flags should be cleared after the call.

It all seems a bit weird. If you analyze the code then you will see that
most of the time nFlags are passed unchanged to BufferMgmtCallback.
However, if there is EOS flag set then all nFlags are reset (even if they
contain different flags such as OMX_BUFFERFLAG_DECODEONLY or
OMX_BUFFERFLAG_EXTRADATA).

As it seems at least confusing and makes proposed solution above not
enough on its own, here comes an extra change to
omx_base_sink_BufferMgmtFunction :
move
pInputBuffer->nFlags=0;
after comment
/*Input Buffer has been completely consumed. So, get new input
buffer*/







Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2009-11-03 15:31 gsent
allow_comments 1 2009-11-03 15:31 gsent
close_date - 2009-11-03 15:31 gsent