[FFmpeg-trac] #8281(undetermined:new): memory leaks from options.c:158 in avcodec_alloc_context3

FFmpeg trac at avcodec.org
Tue Oct 15 19:34:43 EEST 2019


#8281: memory leaks from options.c:158 in avcodec_alloc_context3
-------------------------------------+-------------------------------------
             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 maybe from options.c:158 in avcodec_alloc_context3

 How to reproduce:
 {{{
 % ffmpeg_g -y -i $PoC -loglevel 0 -vbsf h264_mp4toannexb -c:a:139 msmpeg4
 -disposition:s:11 utvideo -aframes 84 -r 96 -ar 22050 tmp.dnxhd

 ffmpeg version N-95385-ge1b89c76f6 Copyright (c) 2000-2019 the FFmpeg
 developers
 built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
 }}}
 Valgrind log.
 {{{
 ==46857==
 ==46857==
 ==46857== HEAP SUMMARY:
 ==46857==     in use at exit: 1,096 bytes in 2 blocks
 ==46857==   total heap usage: 2,770 allocs, 2,768 frees, 3,927,957 bytes
 allocated
 ==46857==
 ==46857== 1,064 bytes in 1 blocks are definitely lost in loss record 2 of
 2
 ==46857==    at 0x9D3BE76: memalign (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==46857==    by 0x9D3BF91: posix_memalign (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==46857==    by 0x590E23D: av_malloc (mem.c:87)
 ==46857==    by 0x2D4E740: avcodec_alloc_context3 (options.c:158)
 ==46857==    by 0x2153CFC: ff_frame_thread_encoder_init
 (frame_thread_encoder.c:198)
 ==46857==    by 0x344D15F: avcodec_open2 (utils.c:740)
 ==46857==    by 0x4A67F1: init_output_stream (ffmpeg.c:3507)
 ==46857==    by 0x4BFF95: reap_filters (ffmpeg.c:1442)
 ==46857==    by 0x48D611: transcode_step (ffmpeg.c:4638)
 ==46857==    by 0x48D611: transcode (ffmpeg.c:4682)
 ==46857==    by 0x487D53: main (ffmpeg.c:4884)
 ==46857==
 ==46857== LEAK SUMMARY:
 ==46857==    definitely lost: 1,064 bytes in 1 blocks
 ==46857==    indirectly lost: 0 bytes in 0 blocks
 ==46857==      possibly lost: 0 bytes in 0 blocks
 ==46857==    still reachable: 32 bytes in 1 blocks
 ==46857==         suppressed: 0 bytes in 0 blocks
 ==46857== Reachable blocks (those to which a pointer was found) are not
 shown.
 ==46857== To see them, rerun with: --leak-check=full --show-leak-kinds=all
 ==46857==
 ==46857== For counts of detected and suppressed errors, rerun with: -v
 ==46857== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

 }}}

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


More information about the FFmpeg-trac mailing list