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 758512 - avviddec: Fix structure memory leak
avviddec: Fix structure memory leak
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
unspecified
Other All
: Normal normal
: 1.6.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-23 01:31 UTC by Vineeth
Modified: 2015-11-23 20:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix structure memory leak (987 bytes, patch)
2015-11-23 01:33 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-11-23 01:31:41 UTC
gst_structure_copy already takes a reference for config_copy. No need to take another reference while setting it to buffer pool

==6247== 815 (32 direct, 783 indirect) bytes in 1 blocks are definitely lost in loss record 6,381 of 6,607
==6247==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6247==    by 0x5D29610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==6247==    by 0x5D3F22D: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==6247==    by 0x57F9D66: gst_structure_new_id_empty_with_size (gststructure.c:145)
==6247==    by 0x57FB8CA: gst_structure_copy (gststructure.c:345)
==6247==    by 0x150635D0: gst_ffmpegviddec_decide_allocation (gstavviddec.c:1851)
==6247==    by 0x552C255: gst_video_decoder_negotiate_pool (gstvideodecoder.c:3698)
==6247==    by 0x5534D86: gst_video_decoder_allocate_output_frame (gstvideodecoder.c:3836)
==6247==    by 0x14FF9FFF: get_output_buffer.part.4 (gstavviddec.c:1216)
==6247==    by 0x150642EC: gst_ffmpegviddec_frame (gstavviddec.c:1416)
==6247==    by 0x1506547F: gst_ffmpegviddec_handle_frame (gstavviddec.c:1654)
==6247==    by 0x552AA58: gst_video_decoder_decode_frame (gstvideodecoder.c:3406)
Comment 1 Vineeth 2015-11-23 01:33:33 UTC
Created attachment 316062 [details] [review]
fix structure memory leak
Comment 2 Thiago Sousa Santos 2015-11-23 15:30:30 UTC
commit 839a72f92ca23de39d31aa36839f85a9fb7d6356
Author: Vineeth T M <vineeth.tm@samsung.com>
Date:   Mon Nov 23 10:31:39 2015 +0900

    avviddec: Fix structure memory leak
    
    gst_structure_copy already takes a reference for config_copy.
    No need to take another reference while setting it to buffer pool
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758512
Comment 3 Thiago Sousa Santos 2015-11-23 20:44:32 UTC
Merged in 1.6

commit 122fce883ab0fc09207aa084c134bf45dcc7400f
Author: Vineeth T M <vineeth.tm@samsung.com>
Date:   Mon Nov 23 10:31:39 2015 +0900

    avviddec: Fix structure memory leak
    
    gst_structure_copy already takes a reference for config_copy.
    No need to take another reference while setting it to buffer pool
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758512