[FFmpeg-trac] #4600(undetermined:new): Handle leak when opening video files
FFmpeg
trac at avcodec.org
Tue Jun 9 06:06:39 CEST 2015
#4600: Handle leak when opening video files
-------------------------------------+-------------------------------------
Reporter: fortune | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Hi
I'm using the delphi ffmpeg components (http://www.delphiffmpeg.com/)
which make use of ffmpeg dlls to encode and decode video.
I've already reported this problem to the author of the delphi components
but he says the problem lies with the ffmpeg dlls and there's nothing he
can do.
The problem is that the handle count (as viewed via task manager) keeps
increasing whenever a video file is opened. This only happens on
multithreaded CPUs and appears to be thread related. If the application
runs for long enough it will eventually crash due to the handle leak.
A workaround that I've found is to force the application to only use a
single CPU via the SetProcessAffinityMask function:
SetProcessAffinityMask(GetCurrentProcess, 1)
This works but the performance suffers due to only one cpu being used.
To reproduce this problem download the FFVCL trial from:
http://www.delphiffmpeg.com/downloads/
Included in the trial is the [MemoryPlayerDemo].exe demo file that uses
ffmpeg DLLs. Start it and watch the task manager handle count when opening
a video file. You'll see that it keeps increasing. Setting the process
affinity to use one CPU stops the problem.
I hope you can help!
Thanks
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4600>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list