03.07.11 23:06, Dan Dennedy написав(ла):
> On Sun, Jul 3, 2011 at 12:48 PM, Maksym Veremeyenko<ve...@m1stereo.tv>  wrote:
>> On Sun, July 3, 2011 10:01 pm, Dan Dennedy wrote:
>>> 2011/7/3 Maksym Veremeyenko<ve...@m1stereo.tv>:
>>>> Hi,
>>>>
>>>> playing files in a loop mode in melted cause a leak of file descriptors
>>>> that
>>>> seen well from /proc/<process id>/fd/<file no>.
>>>>
>>>> the problem comes from avformat's producer re-open code that lost
>>>> release of
>>>> audiostream context.
>>>>
>>>> attached patch fix this behaviour...
>>>
>>> This patch is wrong in a couple of ways. It completely alters the
>>> locking mechanisms, and I will be surprised if it works under
>>> multi-threaded access such as with kdenlive or with parallel consumer.
>>> Your attempt to refactor to common code is noble but naive with
>>> respect to the locking requirements, which are different depending
>>> upon the state of the locks when these similar actions are invoked.
>>> Secondly, it breaks the user-selected audio and video tracks because
>>> in producer_open() they are reset to their defaults. That is why they
>>> were saved before producer_open() and re-applied afterwards.
>>
>> updated patch attached....
>
> Please test my latest commits. In my analysis and testing while
> working on these fixes, I found it is not at all safe to close the
> audio format and codec contexts at this point - think parallel.

there are no leaks noticed with latest git, thanks.

>
> No offense to you, but I am not too comfortable with other people's
> hands getting into avformat producer. That is a very intricate piece
> of work, and there are a lot of special requirements that only I know
> about. Thank you for trying, though! It will be nice for someone else
> to become knowledgeable about this code. If you look at the git log,
> you will see that I have put major effort to refactoring its code
> periodically in order to tame this wild beast.
> If you want to contribute something here, I would accept a patch that
> refactors my recent change that added a take_lock parameter to
> producer_open() into a new function producer_open_with_lock() that
> inside calls producer_open() - similar approach to your patch.
>

ok

-- 
________________________________________
Maksym Veremeyenko

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to