Opened 5 years ago

Closed 5 years ago

#8311 closed defect (fixed)

memory leaks in ff_frame_pool_get()

Reported by: Suhwan Owned by:
Priority: important Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
There are memory leaks detected in ff_frame_pool_get()
How to reproduce:

% ffmpeg_g -y -i $PoC -filter_complex decimate -target svcd -loglevel 0 -vbsf vp9_superframe -c:s:17 g726le tmp.s16le

ffmpeg version N-95458-g9f023017ab Copyright (c) 2000-2019 the FFmpeg developers
built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug

Here's Valgrind log

==17566== HEAP SUMMARY:
==17566==     in use at exit: 13,525 bytes in 17 blocks
==17566==   total heap usage: 3,135 allocs, 3,118 frees, 2,049,475 bytes allocated
==17566== 13,493 (536 direct, 12,957 indirect) bytes in 1 blocks are definitely lost in loss record 7 of 7
==17566==    at 0x9FE2E76: memalign (in /usr/lib/valgrind/
==17566==    by 0x9FE2F91: posix_memalign (in /usr/lib/valgrind/
==17566==    by 0x592E8E9: av_malloc (mem.c:87)
==17566==    by 0x592E8E9: av_mallocz (mem.c:238)
==17566==    by 0x5902A7D: av_frame_alloc (frame.c:191)
==17566==    by 0x64FD65: ff_frame_pool_get (framepool.c:201)
==17566==    by 0xFB85EC: ff_default_get_video_buffer (video.c:90)
==17566==    by 0xD1FF43: scale_frame (vf_scale.c:460)
==17566==    by 0xD1F15C: filter_frame (vf_scale.c:549)
==17566==    by 0x5D002C: ff_filter_frame_framed (avfilter.c:1084)
==17566==    by 0x5D002C: ff_filter_frame_to_filter (avfilter.c:1232)
==17566==    by 0x5D002C: ff_filter_activate_default (avfilter.c:1281)
==17566==    by 0x5D002C: ff_filter_activate (avfilter.c:1443)
==17566==    by 0x5F4434: push_frame (buffersrc.c:187)
==17566==    by 0x5F4434: av_buffersrc_add_frame_internal (buffersrc.c:261)
==17566==    by 0x5F300D: av_buffersrc_add_frame_flags (buffersrc.c:170)
==17566==    by 0x4CAD7F: ifilter_send_frame (ffmpeg.c:2186)
==17566==    by 0x4CAD7F: send_frame_to_filters (ffmpeg.c:2260)
==17566== LEAK SUMMARY:
==17566==    definitely lost: 536 bytes in 1 blocks
==17566==    indirectly lost: 12,957 bytes in 15 blocks
==17566==      possibly lost: 0 bytes in 0 blocks
==17566==    still reachable: 32 bytes in 1 blocks
==17566==         suppressed: 0 bytes in 0 blocks
==17566== Reachable blocks (those to which a pointer was found) are not shown.
==17566== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==17566== For counts of detected and suppressed errors, rerun with: -v
==17566== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Please confirm.

Attachments (1)

PoC.tga (3.5 KB ) - added by Suhwan 5 years ago.

Download all attachments as: .zip

Change History (2)

by Suhwan, 5 years ago

Attachment: PoC.tga added


comment:1 by Elon Musk, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.