GNOME Bugzilla – Bug 640063
rtph264depay: leaks codec data buffer in byte-stream=false mode
Last modified: 2011-01-20 14:14:26 UTC
here is a leak in a pipeline such this: rtspsrc location=.... ! rtph264depay ! ... ==14381== 459 (360 direct, 99 indirect) bytes in 3 blocks are definitely lost in loss record 3,928 of 4,029 ==14381== at 0x4C274A8: malloc (vg_replace_malloc.c:236) ==14381== by 0x6137754: g_malloc (in /lib/libglib-2.0.so.0.2400.1) ==14381== by 0x614C759: g_slice_alloc (in /lib/libglib-2.0.so.0.2400.1) ==14381== by 0x614CA65: g_slice_alloc0 (in /lib/libglib-2.0.so.0.2400.1) ==14381== by 0x55755BA: g_type_create_instance (in /usr/lib/libgobject-2.0.so.0.2400.1) ==14381== by 0x52BBBD1: gst_mini_object_new (gstminiobject.c:189) ==14381== by 0x52988B0: gst_buffer_new (gstbuffer.c:334) ==14381== by 0x5298CAC: gst_buffer_new_and_alloc (gstbuffer.c:364) ==14381== by 0xA4569C5: gst_rtp_h264_depay_setcaps (gstrtph264depay.c:400) ==14381== by 0x9FF2BD6: gst_base_rtp_depayload_setcaps (gstbasertpdepayload.c:247) ==14381== by 0x52BF74E: gst_pad_set_caps (gstpad.c:2692) ==14381== by 0x52BFBC2: gst_pad_chain_data_unchecked (gstpad.c:4208
Tested with: tpm@zingle:~/gst/git/gst-plugins-good/gst/rtp$ G_SLICE=always-malloc valgrind --leak-check=yes --num-callers=20 --suppressions=../../common/gst.supp ../../../gstreamer/tools/.libs/gst-launch-0.10 rtspsrc location=rtsp://masds03.htc.com.tw/h264/VideoOnly/H264_15f_128k_5KF_qvga.3gp ! rtph264depay byte-stream=false ! fakesink -v and fixed (albeit with wrong commit message): commit 693b3b7e0bc16604321724686c1e174c6b6fb45b Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Jan 20 14:10:55 2011 +0000 h264depay: don't leak codec data buffer in byte-stream=true mode [N.B. this should be byte-stream=false of course] https://bugzilla.gnome.org/show_bug.cgi?id=640063