[FFmpeg-trac] #2534(avformat:new): maybe memory leak of av_read_frame/av_free_packet.
FFmpeg
trac at avcodec.org
Sun May 5 10:59:42 CEST 2013
#2534: maybe memory leak of av_read_frame/av_free_packet.
-------------------------------------+-------------------------------------
Reporter: yan | Type:
Status: new | enhancement
Component: avformat | Priority: important
Keywords: memory | Version: 1.2
leaks of avformat | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2534>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list