From: James Courtier-D. <Ja...@su...> - 2002-04-16 15:07:54
|
Miguel Freitas wrote: >On Tue, 2002-04-16 at 05:02, James Courtier-Dutton wrote: > > >>Hello >>I have found a problem with seeking. >>If you do it enough times, I.E. Keep you finger on the mouse, and slide >>the slider backwards and forwards, xine hangs after a bit. >>This happens becauce the input plugin get caught in a lock waiting for a >>buffer(the demuxer is locked before the call to the input plugin), which >>the gui gets caught waiting for a lock in demux_mpeg_block_start: line 863. >> >>Can anyone think of a neat way out of this one ? >> >> > > >It's impossible to tell why it freezed inspecting only these two >threads. You are reporting the effect, not the cause. > > >Miguel > > > Ok, maybe I am not proving the fact, it was only a theory. If the input plugin is locked waiting for a buffer, the demuxer will also be locked, because the demuxer locks itself before the call to input->read_block. Now, the seek function trys to lock the demuxer before it does the seek, but if the demuxer is already locked, it will hang. As the seek function call is from the gui thread, if that hangs waiting for it's lock to free, the GUI will hang, which is what I am seeing. I enclosed the backtrace of these two threads which I think is the problem. At the moment, this is only a theory. Cheers James |