After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705142 - flvdemux: leaks stream_id string
flvdemux: leaks stream_id string
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.0.7
Other Linux
: Normal major
: 1.0.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-30 12:55 UTC by urchikkamath
Modified: 2013-07-30 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description urchikkamath 2013-07-30 12:55:22 UTC
Hello,
I found memory leak with flvdemux plugin (71 bytes in 1 blocks are definitely lost). Memory leak testing performed using Valgrind(Valgrind-3.7.0).  
Command used for testing:
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --track-origins=yes --suppressions=gst.supp --log-file=valgrind_gst.log gst-launch-1.0 filesrc location=Input.flv ! flvdemux name=demux demux.audio ! queue ! 'audio/mpeg,mpegversion=4' ! flvmux name=mux ! filesink location="dummy.flv" demux.video ! queue ! mux.video

Snap shot of memory leak:
==9428== 71 bytes in 1 blocks are definitely lost in loss record 1,326 of 1,900
==9428==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9428==    by 0x53C1A78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
==9428==    by 0x53D65F4: g_strconcat (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
==9428==    by 0x4EC8E36: gst_pad_create_stream_id_printf_valist (gstutils.c:3633)
==9428==    by 0x4EC9041: gst_pad_create_stream_id_printf (gstutils.c:3675)
==9428==    by 0x8952268: gst_flv_demux_video_negotiate (gstflvdemux.c:1238)
==9428==    by 0x8952F6A: gst_flv_demux_parse_tag_video (gstflvdemux.c:1443)
==9428==    by 0x89570BB: gst_flv_demux_loop (gstflvdemux.c:2162)
==9428==    by 0x4EBDA9E: gst_task_func (gsttask.c:316)
==9428==    by 0x53DE247: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
==9428==    by 0x53DD9E4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
==9428==    by 0x5670E99: start_thread (pthread_create.c:308)

Thanks.
Comment 1 Tim-Philipp Müller 2013-07-30 13:31:57 UTC
This should fix it:

 commit a5532b4510c7c4d4b2630e82108c8686a6a17808
 Author: Tim-Philipp Müller <tim@centricular.net>
 Date:   Tue Jul 30 14:28:19 2013 +0100

    flvdemux: don't leak stream_id string
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705142

Thanks for the bug report!