[mythtv] [PATCH] Workaround for hangs when ffwd/rewinding video

Paul Andreassen paulx at andreassen.com.au
Mon Sep 25 10:17:12 UTC 2006


On Thu, 21 Sep 2006 05:58 am, Matt Holgate wrote:
> I'm running myth-0.20-fixes on a VIA EPIA M10000 box, and I get
> regularly get hangs while fast forwarding/rewinding videos (live tv or
> recorded).
>
> It seems to happen when seeking then resuming playback. In the logs I
> get loads of messages like:
>
> 2006-09-20 20:40:27.917 Waited too long for video out to pause
>
> I've seen other people point out this issue too. Tracing it back, it
> seems to be getting stuck in PauseVideo():
>
> #0  0xb5df3440 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
> /lib/tls/libpthread.so.0
> #1  0xb64e04e0 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
> #2  0xb792fcba in NuppelVideoPlayer::PauseVideo (this=0x8f32db0, wait=true)
>      at NuppelVideoPlayer.cpp:456
> #3  0xb7943448 in NuppelVideoPlayer::StartPlaying (this=0x8f32db0)
>      at NuppelVideoPlayer.cpp:3317
> #4  0xb78deedf in SpawnDecode (param=0x8f32db0) at tv_play.cpp:256
> #5  0xb5df0b63 in start_thread () from /lib/tls/libpthread.so.0
> #6  0xb5ca918a in clone () from /lib/tls/libc.so.6
>
> I think what is happening is that the seeking operation is trying to
> pause the video:
>
>             if (fftime >= 5)
>              {
>                  PauseVideo();
>
> but there is a race between PauseVideo() setting the pausevideo member
> to true:
>
> void NuppelVideoPlayer::PauseVideo(bool wait)
> {
>      video_actually_paused = false;
>      pausevideo = true;
>
> and the user pressing 'play' causing pausevideo to become false in
> UnpauseVideo()
>
>
> void NuppelVideoPlayer::UnpauseVideo(void)
> {
>      pausevideo = false;
> }
>
> I think this is causing PauseVideo to get stuck in an infinite loop will
> trying to seek.
>
> I've attached a patch which works around this, but I've no idea if it's
> the correct thing to do. If you think it seems sensible, I'll open a
> ticket and submit it properly. Feedback please :)
>
> thanks a lot,
> Matt.

Hi Matt,

Thanks for the patch.  I've trained myself not to change directions while fast 
forwarding, just so my M10000 wont lockup and require a keyboard mythfrontend 
restart.  With this patch it doesn't seem to be a problem anymore.

Thanks again,
Paul
-- 


More information about the mythtv-dev mailing list