From 8b542e208d6a11c9d5d43a32a07ca8b82e9f2185 Mon Sep 17 00:00:00 2001 From: Jim Stichnoth Date: Tue, 13 Aug 2013 05:47:52 -0700 Subject: [PATCH] Don't wait for paused audio to drain. Fixes #11730. The problem is that MythPlayer::AVSync() might pause audio while dropping a frame, and if this happens during the EOF A/V draining period, it could wait forever for the audio to drain. Alternatively or in addition, AVSync() could check that GetEof()!=kEofStateDelayed before pausing audio. Thanks to Mark Spieth for the analysis. --- mythtv/libs/libmythtv/mythplayer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp index d2ac6c89d1c..ac7373f3033 100644 --- a/mythtv/libs/libmythtv/mythplayer.cpp +++ b/mythtv/libs/libmythtv/mythplayer.cpp @@ -2957,6 +2957,7 @@ void MythPlayer::EventLoop(void) videoOutput && videoOutput->ValidVideoFrames() < 1; bool audioDrained = !audio.GetAudioOutput() || + audio.IsPaused() || audio.GetAudioOutput()->GetAudioBufferedTime() < 100; if (eof != kEofStateDelayed || (videoDrained && audioDrained)) {