Memory leak when gstreamer playing RTSP with libgstvpu

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak when gstreamer playing RTSP with libgstvpu

1,881 Views
Contributor I

Command:

gst-launch-1.0 playbin uri=rtsp://192.168.1.88:556/vga

The memory of gst-launch-1.0 will increase more than 30M every hour, then the video stop, but audio soud ok。

 Delete the libgstvpu.so , use the same commad. memory will not increase,  but play the high resolution (1920x1080) not smooth.

Anybody  has faced the same problem and resolved? Please help

karinavalencia

I do more test.

Compare playing local video file and RTSP:

1)  play 1920x1080 (MPEG4\AVC_H_L3local files, that seems not has memory leak.  (log file : gplay-test-AVC_H_L3_Schindlers.log、gplay-test-MPEG4_Schindlers.log)

2) play 1920x1080 (AVC_H) RTSP, memory increase about 16M. (log file: gplay-test-AVC_H_RTSP.log)

Compare playing RTSP(960x540 AVC_H)  with vpudec and avdec_h264 lib:

a) use vpudec , memory increase about 10M in 20 mins.( log file: gplay-test-AVC_H_RTSP_with_VPU.log)

b) use avdec_h264(delete /usr/lib/gstreamer-1.0/libgstvpu.so) , memory not increase. (log file: gplay-test-AVC_H_RTSP_with_avdec_h264.log)

 

CPU: IMX6DL

Kernel: 4.1.15

BSP: 2.0.1 GA

vpudec: imx-gst1.0-plugin-4.1.4

avdec_h264:gst-libav-1.8.1

Labels (1)
0 Kudos
45 Replies

15 Views
Contributor I

又对比测试了gstreamer0.10 的版本, 使用mfw_vpudec解码,是没有内存泄漏的。

内核是使用相同的4.1.15, 所以应该跟硬件没有关系。

我们的产品已经出货1年多,最近测试高分辨率的流媒体才测试出来了,如果重新换回gstreamer0.10,工作量有点大(而且好像yocto无法同时编译gstreamer0.10和qt5),请帮忙分析和解决gstreamer1.0下的libgstvpu.so内存泄漏问题。

0 Kudos

15 Views
Contributor I

I have already use the new version with yocto imx-yocto-L4.14.78_1.0.0_ga, still face the same problem.

Does anyone can give some  advice?

Play command is "gst-launch-1.0 playbin uri=rtsp://192.168.1.98:8554/vga"

Memory start from 358m to 391m jus use 2hours.

[03-11-15:01:03.121] 1226   499 root     S     358m

[03-11-17:03:58.730] 1226   499 root     S     391m 

CPU: IMX6DL

Kernel: 4.14.78

BSP: imx-yocto-L4.14.78_1.0.0_ga

GST: gstreamer 1.14

         imx-gst1.0-plugin-4.4.4

@Juan Antonio Gutierrez RosasYocto BSP for SCM-i.MX L4.1.15-2.0.0_ga

Qiang_FSL

i.MX Processors

0 Kudos

15 Views
NXP TechSupport
NXP TechSupport

Please try to apply this patch:

https://community.nxp.com/docs/DOC-335878

It may help with gstreamer memory leak.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

15 Views
Contributor I

Thanks for your replay. 

I follow the patch patch_v4l2_issue.zip , but not find any about v4l2 in arch/arm/mach-imx/mach-imx6q.c. 

So I just modify videobuf-dma-contig.c,  drivers/media/video/mxc/output/mxc_vout.c and drivers/mxc/vpu/mxc_vpu.c.

But the memory still increase more than 40M per hour.  

VSZ    %VSZ   CPU    %CPU        COMMAND

396m   39.5       1           21.1         gst-launch-1.0 playbin uri=rtsp://192.168.1.98:8554/vga

The memory is start from 335M to 396M.

CPU: IMX6DL

Kernel: 4.1.15

BSP: 2.0.1 GA

GST: imx-gst1.0-plugin-4.1.4

0 Kudos