Opened 13 years ago
Last modified 12 years ago
#1357 new defect
Memleak when avformat_open_input used together with avio_context
Reported by: | xire | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | leak |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Hello,
Here's the Valgrind output from the small test program. If you uncomment those 3 lines (see source), leak goes away.
Valgrind output:
valgrind --tool=memcheck --leak-check=yes ./test
==2239== Memcheck, a memory error detector
==2239== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==2239== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==2239== Command: ./test
==2239==
Input #0, mp3, from 'silence.mp3':
Duration: N/A, bitrate: N/A
Stream #0:0: Audio: mp3, 0 channels
avio_context->buffer_size=32768
==2239==
==2239== HEAP SUMMARY:
==2239== in use at exit: 32,768 bytes in 1 blocks
==2239== total heap usage: 13 allocs, 12 frees, 1,142,473 bytes allocated
==2239==
==2239== 32,768 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2239== at 0x402695A: realloc (vg_replace_malloc.c:525)
==2239== by 0x86C0FC8: av_realloc_f (mem.c:149)
==2239== by 0x8091BBC: ffio_rewind_with_probe_data (aviobuf.c:745)
==2239== by 0x814503B: av_probe_input_buffer (utils.c:524)
==2239== by 0x814B054: avformat_open_input (utils.c:539)
==2239== by 0x42EB27F: ???
==2239==
==2239== LEAK SUMMARY:
==2239== definitely lost: 32,768 bytes in 1 blocks
==2239== indirectly lost: 0 bytes in 0 blocks
==2239== possibly lost: 0 bytes in 0 blocks
==2239== still reachable: 0 bytes in 0 blocks
==2239== suppressed: 0 bytes in 0 blocks
==2239==
==2239== For counts of detected and suppressed errors, rerun with: -v
==2239== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 19 from 6)
ffmpeg version:
ffmpeg version N-41032-gc0b47d1 Copyright (c) 2000-2012 the FFmpeg developers
built on May 26 2012 13:02:47 with gcc 4.5.2
configuration: --enable-debug
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
Attachments (3)
Change History (4)
by , 13 years ago
by , 13 years ago
by , 13 years ago
Attachment: | silence.mp3 added |
---|
comment:1 by , 12 years ago
Keywords: | leak added |
---|