[Bug 754157] New: caps: fix memory leak when getting caps from static caps
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Aug 27 00:41:34 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=754157
Bug ID: 754157
Summary: caps: fix memory leak when getting caps from static
caps
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: vineeth.tm at samsung.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
In case there is no caps in static caps, then it tries to get caps from string.
But gst_caps_from_string creates a new reference, and increasing the reference
again leads to memory leak
This can be tested with valgrind of the below pipeline
videotestsrc num-buffers=20 ! dvbsuboverlay ! fakesink
==10149== 1,477 (40 direct, 1,437 indirect) bytes in 1 blocks are definitely
lost in loss record 3,633 of 3,658
==10149== at 0x402C17C: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==10149== by 0x43D1BE2: g_malloc (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==10149== by 0x43E8281: g_slice_alloc (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==10149== by 0x424F13B: gst_caps_new_empty (gstcaps.c:243)
==10149== by 0x42527E2: gst_caps_from_string (gstcaps.c:2344)
==10149== by 0x4252B3C: gst_static_caps_get (gstcaps.c:415)
==10149== by 0x404CBFE: gst_dvbsub_overlay_event_video
(gstdvbsuboverlay.c:652)
==10149== by 0x41EBE8B: gst_validate_pad_monitor_downstream_event_check
(gst-validate-pad-monitor.c:1788)
==10149== by 0x41F024F: gst_validate_pad_monitor_sink_event_func
(gst-validate-pad-monitor.c:2103)
==10149== by 0x427D34C: gst_pad_send_event_unchecked (gstpad.c:5452)
==10149== by 0x427DAD6: gst_pad_push_event_unchecked (gstpad.c:5123)
==10149== by 0x427E127: push_sticky (gstpad.c:3690)
==10149== by 0x427BEF6: events_foreach (gstpad.c:597)
==10149== by 0x4287D0A: gst_pad_push_event (gstpad.c:3746)
==10149== by 0x4876C05: gst_base_src_set_caps (gstbasesrc.c:925)
==10149== by 0x48770B1: gst_base_src_default_negotiate (gstbasesrc.c:3227)
==10149== by 0x4874439: gst_base_src_loop (gstbasesrc.c:3267)
==10149== by 0x42B3138: gst_task_func (gsttask.c:331)
==10149== by 0x42B41EE: default_func (gsttaskpool.c:68)
==10149== by 0x43F3404: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list