[MPlayer-dev-eng] [PATCH] more general ao_macosx cleanup

Nicolas Plourde nicolas.plourde at gmail.com
Wed Jun 29 21:04:37 CEST 2005


On 29-Jun-05, at 2:48 AM, Alexander Strange wrote:

> This patch does several things:
> * Remove ao->chunk, since the system already gives us a buffer so  
> it's pointless.
> * Properly reuse everything when init() is called more than once  
> without an uninit() (for instance, speed changing). Previously, it  
> reallocated everything without disposing of the old copies, causing  
> enormous resource leaks.
> * Fix handling of AOCONTROL_QUERY_FORMAT; if anything ever used it,  
> it wasn't returning the right result before.
> * Pause the audio output when it runs out of sound in the buffer,  
> instead of having it continually request more audio and get  
> nothing. This reduces context switches and CPU use and all that,  
> and has a very large effect on the problem with the video dropping  
> frames at the very start. This approach isn't quite perfect; I can  
> see the possibility of a race condition that would cause subtle  
> popping sounds (from audio being paused and unpaused very rapidly),  
> but haven't heard it on any test files.
> * Fix some undefined behavior that only worked because malloc() was  
> returning a block that was all zero.
>
> The remaining problems I can see are:
> * it doesn't find out the current speaker configuration properly,  
> so surround will probably do the wrong thing (this wasn't  
> introduced by my code).
> * get_delay() is probably wrong now, but was also probably wrong  
> before.
>


Commited. Alexander  Please have a look at this patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 3160 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050629/4d6dae6f/attachment.obj>
-------------- next part --------------

====
Nicolas Plourde <nicolas.plourde at gmail.com>





More information about the MPlayer-dev-eng mailing list