[FFmpeg-trac] #8094(undetermined:new): Memory leaks from realloc
FFmpeg
trac at avcodec.org
Sun Sep 15 14:09:47 EEST 2019
#8094: Memory leaks from realloc
-------------------------------------+-------------------------------------
Reporter: Suhwan | Owner:
Type: defect | Status: new
Priority: important | Component:
| undetermined
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Changes (by Suhwan):
* priority: normal => important
Comment:
Valgrind report
{{{
$ valgrind ./ffmpeg_g -i ./samples/ogg/audio-gaps.ogg -loglevel 99 -c
copy -map 0 -y -disposition:v:174 a64multi -c:a:171 a64multi
-disposition:s:9 a64multi -stream_loop 24 -t 3 -target vcd -r 82 -ab 907
-ar 22050 -ac 4 -b:v 866k -level 12 -strict 3 tmp.mp4
}}}
{{{
==21685== Memcheck, a memory error detector
==21685== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==21685== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright
info
==21685== Command: ../ffmpeg/ffmpeg_g -i ./samples/ogg/audio-gaps.ogg
-loglevel 99 -c copy -map 0 -y -disposition:v:174 a64multi -c:a:171
a64multi -disposition:s:9 a64multi -stream_loop 24 -t 3 -target vcd -r 82
-ab 907 -ar 22050 -ac 4 -b:v 866k -level 12 -strict 3 tmp.mp4
==21685==
ffmpeg version N-94906-gcb8d6a4e3e 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
--toolchain=clang-usan
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 56.101 / 58. 56.101
libavformat 58. 32.104 / 58. 32.104
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.102 / 7. 58.102
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument './samples/ogg
/audio-gaps.ogg'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument '99'.
Reading option '-c' ... matched as option 'c' (codec name) with argument
'copy'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0'.
Reading option '-y' ... matched as option 'y' (overwrite output files)
with argument '1'.
Reading option '-disposition:v:174' ... matched as option 'disposition'
(disposition) with argument 'a64multi'.
Reading option '-c:a:171' ... matched as option 'c' (codec name) with
argument 'a64multi'.
Reading option '-disposition:s:9' ... matched as option 'disposition'
(disposition) with argument 'a64multi'.
Reading option '-stream_loop' ... matched as option 'stream_loop' (set
number of times input stream shall be looped) with argument '24'.
Reading option '-t' ... matched as option 't' (record or transcode
"duration" seconds of audio/video) with argument '3'.
Reading option '-target' ... matched as option 'target' (specify target
file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes
"pal-", "ntsc-" or "film-")) with argument 'vcd'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value,
fraction or abbreviation)) with argument '82'.
Reading option '-ab' ... matched as option 'ab' (audio bitrate (please use
-b:a)) with argument '907'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '22050'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '4'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use
-b:v)) with argument '866k'.
Reading option '-level' ... matched as AVOption 'level' with argument
'12'.
Reading option '-strict' ...Routing option strict to both codec and muxer
layer
matched as AVOption 'strict' with argument '3'.
Reading option 'tmp.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument 99.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url ./samples/ogg/audio-gaps.ogg.
Successfully parsed a group of options.
Opening an input file: ./samples/ogg/audio-gaps.ogg.
[NULL @ 0x11c4b880] Opening './samples/ogg/audio-gaps.ogg' for reading
[file @ 0x11c4c6c0] Setting default whitelist 'file,crypto'
Probing mp3 score:1 size:2048
Probing ogg score:100 size:2048
[ogg @ 0x11c4b880] Format ogg probed with size=2048 and score=100
[ogg @ 0x11c4b880] ogg_packet: curidx=-1
[ogg @ 0x11c4b880] ogg_packet: idx=0 pstart=0 psize=0 segp=0 nsegs=1
[ogg @ 0x11c4b880] ogg_packet: curidx=-1
[ogg @ 0x11c4b880] ogg_packet: idx=0 pstart=30 psize=0 segp=0 nsegs=14
[ogg @ 0x11c4b880] ogg_packet: curidx=0
[ogg @ 0x11c4b880] ogg_packet: idx=0 pstart=46 psize=0 segp=1 nsegs=14
[ogg @ 0x11c4b880] ogg_packet: curidx=-1
[ogg @ 0x11c4b880] ogg_packet: idx=0 pstart=3288 psize=0 segp=0 nsegs=19
[ogg @ 0x11c4b880] found headers
[ogg @ 0x11c4b880] ogg_packet: curidx=-1
[ogg @ 0x11c4b880] ogg_packet: idx=0 pstart=0 psize=0 segp=0 nsegs=19
[ogg @ 0x11c4b880] Before avformat_find_stream_info() pos: 7636 bytes
read:12306 seeks:0 nb_streams:1
[ogg @ 0x11c4b880] ogg_packet: curidx=0
[ogg @ 0x11c4b880] ogg_packet: idx=0 pstart=3288 psize=0 segp=0 nsegs=19
[ogg @ 0x11c4b880] All info found
[ogg @ 0x11c4b880] stream 0: start_time: 0.000 duration: 2.301
[ogg @ 0x11c4b880] format: start_time: 0.000 duration: 2.301 bitrate=42
kb/s
[ogg @ 0x11c4b880] After avformat_find_stream_info() pos: 7636 bytes
read:12306 seeks:0 frames:1
Input #0, ogg, from './samples/ogg/audio-gaps.ogg':
Duration: 00:00:02.30, start: 0.000000, bitrate: 42 kb/s
Stream #0:0, 1, 1/11127: Audio: vorbis, 11127 Hz, stereo, fltp
Successfully opened the file.
Parsing a group of options: output url tmp.mp4.
Applying option c (codec name) with argument copy.
Applying option map (set input stream mapping) with argument 0.
Applying option disposition:v:174 (disposition) with argument a64multi.
Applying option c:a:171 (codec name) with argument a64multi.
Applying option disposition:s:9 (disposition) with argument a64multi.
Option stream_loop (set number of times input stream shall be looped)
cannot be applied to output url tmp.mp4 -- you are trying to apply an
input option to an output file or vice versa. Move this option before the
file it belongs to.
Error parsing options for output file tmp.mp4.
Error opening output files: Invalid argument
[AVIOContext @ 0x11c551c0] Statistics: 12306 bytes read, 0 seeks
==21685==
==21685== HEAP SUMMARY:
==21685== in use at exit: 177 bytes in 12 blocks
==21685== total heap usage: 322 allocs, 310 frees, 1,022,052 bytes
allocated
==21685==
==21685== LEAK SUMMARY:
==21685== definitely lost: 96 bytes in 3 blocks
==21685== indirectly lost: 49 bytes in 8 blocks
==21685== possibly lost: 0 bytes in 0 blocks
==21685== still reachable: 32 bytes in 1 blocks
==21685== suppressed: 0 bytes in 0 blocks
==21685== Rerun with --leak-check=full to see details of leaked memory
==21685==
==21685== For counts of detected and suppressed errors, rerun with: -v
==21685== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8094#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list