GNOME Bugzilla – Bug 696495
gst-libav: context leak
Last modified: 2014-01-15 10:21:26 UTC
Hi, I know that 0.10 is no more maintained and this bug will probably never be fixed, however current 0.10 git has this memory leak ==17390== 38,004 (264 direct, 37,740 indirect) bytes in 1 blocks are definitely lost in loss record 13,945 of 13,956 ==17390== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==17390== by 0x55CAA78: g_malloc (gmem.c:159) ==17390== by 0x55DDCA2: g_slice_alloc (gslice.c:1003) ==17390== by 0x55DE1E5: g_slice_alloc0 (gslice.c:1029) ==17390== by 0x1D83277B: gst_video_decoder_new_frame (gstvideodecoder.c:1977) ==17390== by 0x1D832B4F: gst_video_decoder_chain_forward (gstvideodecoder.c:1635) ==17390== by 0x1D8338B4: gst_video_decoder_chain (gstvideodecoder.c:1882) ==17390== by 0x50A2F99: gst_pad_push (gstpad.c:4715) ==17390== by 0x1CAE1AF6: gst_queue_loop (gstqueue.c:1156) ==17390== by 0x50C9AEB: gst_task_func (gsttask.c:328) ==17390== by 0x55E7247: g_thread_pool_thread_proxy (gthreadpool.c:309) ==17390== by 0x55E69E4: g_thread_proxy (gthread.c:801) ==17390== by 0x7B75E99: start_thread (pthread_create.c:308) ==17390== by 0x75A6CBC: clone (clone.S:112) the problem does not affect gstreamer-sdk and probably happen in some corner case
If you make a patch, and it looks reasonably non-intrusive, it might get committed. If you provide a sample gst-launch pipeline or program that reproduces it, there's a slim chance someone might check it out. Just filing a valgrind info without context, however, is unlikely to get looked at by anyone any more, sorry.
here are some sample pipelines: gst-launch souphttpsrc location=... ! matroskademux ! ffdec_h264 ! xvimagesink gst-launch rtspsrc location=... ! rtph264depay ! ffdec_h264 ! xvimagesink
commit ca1b5d85765be8df27d0a87a45426c7925ce1f29 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Wed Jan 15 09:02:33 2014 +0000 gst-libav: fix context leaks A AVCodecContext needs cleaning up before being freed. Go through all of the allocations/setups to ensure none of them can leak a context or its contents. This fixes the leaks I got with the first pipeline from comment 2.