[FFmpeg-trac] #8346(undetermined:new): memory leaks in ff_inlink_consume_samples()

FFmpeg trac at avcodec.org
Wed Oct 30 19:50:02 EET 2019


#8346: memory leaks in ff_inlink_consume_samples()
-------------------------------------+-------------------------------------
             Reporter:  Suhwan       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 There are memory leaks in ff_inlink_consume_samples()
 How to reproduce:
 {{{
 % ffmpeg_g -t 3 -stream_loop 5 -y -i $PoC1 -i $PoC2 -filter_complex
 acrossfade -loglevel 0 -map 0 -aframes 13 tmp.flac

 commit 648b422e171d5eab18f6c6fd346e4050d717b936
 ffmpeg version N-95601-g648b422e17 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

 {{{
 ==45601== HEAP SUMMARY:
 ==45601==     in use at exit: 89,016 bytes in 7 blocks
 ==45601==   total heap usage: 2,133 allocs, 2,126 frees, 12,703,359 bytes
 allocated
 ==45601==
 ==45601== 88,984 (536 direct, 88,448 indirect) bytes in 1 blocks are
 definitely lost in loss record 7 of 7
 ==45601==    at 0xA031E76: memalign (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==45601==    by 0xA031F91: posix_memalign (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==45601==    by 0x59642E9: av_malloc (mem.c:87)
 ==45601==    by 0x59642E9: av_mallocz (mem.c:238)
 ==45601==    by 0x593847D: av_frame_alloc (frame.c:191)
 ==45601==    by 0x64FDA5: ff_frame_pool_get (framepool.c:201)
 ==45601==    by 0x509614: ff_default_get_audio_buffer (audio.c:73)
 ==45601==    by 0x5D120F: take_samples (avfilter.c:1181)
 ==45601==    by 0x5D120F: ff_inlink_consume_samples (avfilter.c:1525)
 ==45601==    by 0x106AC12: activate (af_afade.c:456)
 ==45601==    by 0x5CE4BB: ff_filter_activate (avfilter.c:1442)
 ==45601==    by 0x5F4C6A: push_frame (buffersrc.c:187)
 ==45601==    by 0x5F4C6A: av_buffersrc_close (buffersrc.c:275)
 ==45601==    by 0x4A1541: ifilter_send_eof (ffmpeg.c:2204)
 ==45601==    by 0x4A1541: send_filter_eof (ffmpeg.c:2553)
 ==45601==    by 0x4A1541: process_input_packet (ffmpeg.c:2692)
 ==45601==    by 0x48EED6: transcode (ffmpeg.c:4700)
 ==45601==
 ==45601== LEAK SUMMARY:
 ==45601==    definitely lost: 536 bytes in 1 blocks
 ==45601==    indirectly lost: 88,448 bytes in 5 blocks
 ==45601==      possibly lost: 0 bytes in 0 blocks
 ==45601==    still reachable: 32 bytes in 1 blocks
 ==45601==         suppressed: 0 bytes in 0 blocks
 ==45601== Reachable blocks (those to which a pointer was found) are not
 shown.
 ==45601== To see them, rerun with: --leak-check=full --show-leak-kinds=all
 ==45601==
 ==45601== For counts of detected and suppressed errors, rerun with: -v
 ==45601== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

 }}}
 Please confirm.
 Thanks

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8346>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list