Opened 11 years ago
Closed 11 years ago
#2534 closed defect (needs_more_info)
maybe memory leak of av_read_frame/av_free_packet.
Reported by: | yan | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | 1.2 | Keywords: | leak |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
i use vertion 1.2 and compile for android (armv7a without neon), following by the guide of "how to compile ffmpeg for android" (http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20compile%20FFmpeg%20for%20Android)
then i get the "*.so"s succesful.
here is my testing code:
....
AVPacket pkt;
int readRet = 0;
av_init_packet(&pkt);
while(1)
{
readRet = av_read_frame(s,&avpkt);
if(readRet < 0)
{
printf("read EOF\n");
break;
}
av_free_packet(&avpkt);
usleep(10*1000);
}
.....
==========
then i check the status of memory usage by using "cat /proc/meminfo"
that after about 20secs from the testing code running.
the "free memory" line in the cat result become less and less.
almost 1MiB eating by the testing code per second.
after the testing code exit by reach the EOF. the eat memory not released !!!!!
the media file is a AVI content file, with H264 1080P60FPS video,and AAC 192K audio stream.
I tried stable version 1.2, 0.11.
Change History (4)
comment:1 by , 11 years ago
Cc: | removed |
---|---|
Keywords: | leak added; memory leaks of avformat removed |
Priority: | important → normal |
Type: | enhancement → defect |
follow-up: 3 comment:2 by , 11 years ago
I also see an "apparent" memory leak when decoding video on android. I've narrowed it down to the same decoding loop as Yan. It eats up all the memory on the devices i've been testing until they crash. Its years since I've used valgrind, this is such a big leak it should be easy to find without using anything like valgrind?????
Its strange because other people should see this problem too.
Yan, did you patch the ffmpeg source at all or just build it straight from the repository?
I'd like to help out on this one.
comment:3 by , 11 years ago
Replying to destroyboy:
I also see an "apparent" memory leak when decoding video on android.
Did you test current git head?
Please provide valgrind output.
comment:4 by , 11 years ago
Resolution: | → needs_more_info |
---|---|
Status: | new → closed |
Please reopen this ticket if you can provide valgrind output or complete source code that allows to reproduce the problem.
Replying to yan:
This is generally not an indication for a memory leak, valgrind output or equivalent is needed for reports about memleaks.
Does valgrind show any leaks?
And please test current git head before reporting bugs.