[MPlayer-dev-eng] [PATCH] Prevent ao_win32 from hanging during uninit(0)
David Bolen
db3l.net at gmail.com
Thu Mar 5 21:59:52 CET 2009
Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> On Thu, Mar 05, 2009 at 02:47:59PM -0500, David Bolen wrote:
>> Any downside to just bounding the loop for now? I do have a
>> self-interest in looking into this further but in the meantime, it's a
>> hang exposure which the patch corrects. Certainly it's an
>> improvement, even if imperfect, over the existing code.
>
> Well, I am undecided if it is worth the effort, I consider just going
> with the ao_sdl solution (which in some ways is also more correct),
> namely:
>> if (!immed)
>> usec_sleep(get_delay() * 1000 * 1000);
Yep, you win, that's cleaner :-)
Ironically, the "calculation" patch was a cleanup of the actual
"sledgehammer" approach of a fixed time limit I had put in to stop the
pain. I guess I should have looked around further for other examples
such as ao_sdl. Still trying to get a handle on the code base...
Was your "worth the effort" point in regards to any patch at all or
just my particular one? I still think preventing the possibility of
an infinite loop in uninit() to be worth it, even if it doesn't solve
all the problems with the module.
-- David
More information about the MPlayer-dev-eng
mailing list