TIDmaiVideoSink uses transport macro to check the recieved buffer type.
If the recieved buffer is non-dmai then it allocates temporay DMAI buffer
copies the upstream buffer data in this temporary buffer.
Latest version of CMEM (ce 2.23.1) does not support allocating buffer from
thread and freeing this buffer in different thread. Because of this we were
getting "CMEMK Error: FREE: Not a registered user of physical buffer
0x877d2000" error reported in BUG# 798.
This patch fixes CMEM error by forcing to allocate the buffer in render
function and deleting the buffer in render function itself. So idea behind
was to allocate and delete the buffer every frame. Ofcourse this is not
good method as it can result in memory fragmentation. Since this is not a
normal usecase hence i'm submitting this easy hack to fix this issue.
In normal use case, TIDmaiVideoSink gets buffer from decoders - which are
belongs to dmaitransport buffer and hence we don't need to create this temporary
buffer. This temporary buffer is used when you are using
"videotestsrc" - which provides gstreamer buffer.