Tinker Board Forum

Full Version: Memory leak on GStreamer when using about-to-finish signal and rkximagesink
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

We are facing a problem on our media solution when using the Tinkerboard with TinkerOS_Debian v2.0.8 and gstreamer .
When we use the about-to-finish signal to implement a gapless transition between videos, we see a memory leak of about 100 MBs every time we set the playbin uri with the new file when using the rkximagesink.
If we switch from rkximagesink to xvimagesink, the memory leak goes away.

If we set the playstate of playbin to null or ready when we get the about-to-finish signal, gstreamer frees the memory right away, but then shows a black screen between the end of the current video and the start of the next video.

We tried building mpp and gstreamer from the sources, but the memory leak persisted.
Has anyone faced this problem before? Or has any leads of how to clear this memory leak using the about-to-finish signal?
Hi LucianoIank:
Could you help to use the newest gstreamer-rockchip to test? And, could you provide the related files and the steps of reproduce to us?


Thank a lot!
HiĀ  yi-hsin_hung.

I have prepared a demo in both python and mono that will allow you to reproduce the problem.
We have tested them in a Tinkerboard with lastest Rockchip Gstreamer compiled in it. It also has mono installed so we can run dot.net programs in it.

The files of this demo can be downloaded at https://drive.google.com/open?id=1HbPjLW...L0yZpaLZoE

Place the files at /home/linaro and execute the Python script GstreamerTest.py or run mono /home/linaro/mono/GStreamerTest.exe to run the demo and reproduce the problem.

Both demos initialize GStreamer, create a playbin object, set the video-sink to rkximagesink, hook the about-to-finish event and play bigbuckbunny.mp4 (a 10 seconds cut of the original file).
Each time the about-to-finish signal is reached, the demo reloads the uri of playbin to bigbuckbunny.mp4, creating a gapless loop.
Whenever it reaches the signal and reloads the uri, there is a memory loss of around 80MB in tinker OS.

It will either hang or crash after 20 or so loops.

Memory loss example:
[Image: ODGMMN4.png]
[Image: HFP0vy8.png]

[Image: dk1clDK.png]

Hello yi-hsin_hung.
Do you have any update regarding this issue?
This is preventing us to run Tinkerboard in our clients since we cannot get gapless video transition running without crashes.
Could you help try the new release v2.1.11? This should be fixed in this release.