Memory leak with curlhttpsrc and adaptivedemux
I have a pipeline to play DASH content. I have replaced souphttpsrc with curlhttpsrc but observed memory leaks with curlhttpsrc and adaptivedemux. The pipeline will be created only once and mpd data will be updated on url change(channel Zap). Valgrind shows the leaks as below
-
==2989== 243 bytes in 18 blocks are definitely lost in loss record 7,766 of 8,397
-
==2989== at 0x483E590: malloc (vg_replace_malloc.c:299)
-
==2989== by 0x5058E7F: vasprintf (vasprintf.c:73)
-
==2989== by 0x4D6F28B: g_vasprintf (gprintf.c:316)
-
==2989== by 0x4D4D113: g_strdup_vprintf (gstrfuncs.c:514)
-
==2989== by 0x4D4D137: g_strdup_printf (gstrfuncs.c:540)
-
==2989== by 0x4BC2F57: gst_object_set_name_default (gstobject.c:546)
-
==2989== by 0x4BC2F57: gst_object_set_name (gstobject.c:609)
-
==2989== by 0x51641A7: object_set_property (gobject.c:1421)
-
==2989== by 0x51647B7: g_object_new_internal (gobject.c:1815)
-
==2989== by 0x516618F: g_object_newv (gobject.c:1928)
-
==2989== by 0x5166803: g_object_new (gobject.c:1621)
-
==2989== by 0x4BF790F: gst_element_factory_create (gstelementfactory.c:372)
-
==2989== by 0x4C534AB: gst_element_make_from_uri (gsturi.c:660)
-
==2989== by 0xBEEA1EB: gst_adaptive_demux_stream_update_source (gstadaptivedemux.c:2944)
-
==2989== by 0xBEEA1EB: gst_adaptive_demux_stream_download_uri (gstadaptivedemux.c:3097)
-
==2989== by 0xBEEC42B: gst_adaptive_demux_stream_download_header_fragment (gstadaptivedemux.c:3259)
-
==2989== by 0xBEEC42B: gst_adaptive_demux_stream_download_fragment (gstadaptivedemux.c:3314)
-
==2989== by 0xBEEC42B: gst_adaptive_demux_stream_download_loop (gstadaptivedemux.c:3739)
-
==2989== by 0x4C4C867: gst_task_func (gsttask.c:332)
-
==2989== by 0x4D55C2F: g_thread_pool_thread_proxy (gthreadpool.c:307)
-
==2989== by 0x4D553CF: g_thread_proxy (gthread.c:780)
-
==2989== by 0x4B805D7: start_thread (pthread_create.c:335)
-
==2989== by 0x50A2101: ??? (clone.S:86)
-
=2989== 16,220 (720 direct, 15,500 indirect) bytes in 45 blocks are definitely lost in loss record 8,363 of 8,397
-
==2989== at 0x483E590: malloc (vg_replace_malloc.c:299)
-
==2989== by 0x4D398A7: g_malloc (gmem.c:94)
-
==2989== by 0x4D4BCBB: g_slice_alloc (gslice.c:1025)
-
==2989== by 0x4C3E1F3: gst_structure_new_id_empty_with_size (gststructure.c:147)
-
==2989== by 0x4C3FFAB: gst_structure_new_valist (gststructure.c:283)
-
==2989== by 0x4C3FFDF: gst_structure_new (gststructure.c:255)
-
==2989== by 0xD8ACE8F: gst_curl_http_src_handle_response (gstcurlhttpsrc.c:1179)
-
==2989== by 0xD8ACE8F: gst_curl_http_src_create (gstcurlhttpsrc.c:818)
-
==2989== by 0xBDC6DF7: gst_base_src_get_range (gstbasesrc.c:2512)
-
==2989== by 0xBDC8563: gst_base_src_loop (gstbasesrc.c:2836)
-
==2989== by 0x4C4C867: gst_task_func (gsttask.c:332)
-
==2989== by 0x4D55C2F: g_thread_pool_thread_proxy (gthreadpool.c:307)
-
==2989== by 0x4D553CF: g_thread_proxy (gthread.c:780)
-
==2989== by 0x4B805D7: start_thread (pthread_create.c:335)
-
==2989== by 0x50A2101: ??? (clone.S:86)
Valgrind didn't reported curlhttpsrc leak when I freed http_headers. But adaptivedemux leaks are still reported.