Laz schrieb:
> On Thursday 28 September 2006 22:40, Martin Wache wrote:
>> Stefan Lucke schrieb:
>>> Just another me too. If I remember my situation correct, I've
>>> had 2 or 3 times the same with xv-out: paused video, window blanked.
>>> After continuing playback, there was a short time with audio and
>>> nothing else. Had to CONTROL-C (killall -9) from command window.
>>>
>>> There are some essential operations in audio-alsa.c , which are
>>> not protected by handleMutex: Suspend(), Resume() and calling
>>> snd_pcm_mmap_writei() after while (paused) usleep(1000); .
>> That is true, those calls are unprotected.
>>
>> However, the audio-out is during normal operation only called from one
>> thread, namely the audio-decoder. Only if the user request a suspend,
>> the mpegdecoder thread suspends the audio-out. But that wasn't the
>> case, so that audio-out was only called by one thread, and that means
>> locks should not be needed.
> 
> Hmmmm...I don't think I get this problem if I suspend decoding, if that's 
> what you mean here by 'suspend'. Having said that, I don't think I've 
> tried suspending the decoding for a long while... I see the effect when I 
> pause playback.
>
I usually suspend the decoding on my vdr when I go away, so I'm pretty
sure that this works ;-)
This is probably the reason why I never noticed this... Now I've tried
to pause my vdr for a long time and indeed it looked up :-(

I have now an idea what could be the reason for the deadlock. It could
be that the counters for synchronizing the video are overflowing, the
result would be a _very_ long delay until the next frame is actually
displayed. That would match quite well with Marco's backtrace...

And here is a patch which hopefully fixes the problem (I'm trying
currently it out, which obviously takes some time... but I wanted to
shared it with you in case someone else wants to join the testing)

Bye,
Martin
Index: mpeg2decoder.c
===================================================================
RCS file: /cvsroot/softdevice/softdevice/mpeg2decoder.c,v
retrieving revision 1.68
diff -u -r1.68 mpeg2decoder.c
--- mpeg2decoder.c      16 Sep 2006 20:26:24 -0000      1.68
+++ mpeg2decoder.c      30 Sep 2006 15:24:42 -0000
@@ -618,6 +642,7 @@
 {
   cStreamDecoder::Play();
   videoOut->FreezeMode(freezeMode);
+  syncTimer->Reset();
 };
 
 void cVideoStreamDecoder::Freeze(bool freeze)

_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel

Reply via email to