Permalink
Browse files

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.
  • Loading branch information...
stichnot committed Aug 13, 2013
1 parent 57ee052 commit 8b542e208d6a11c9d5d43a32a07ca8b82e9f2185
Showing with 1 addition and 0 deletions.
  1. +1 −0 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))
{

0 comments on commit 8b542e2

Please sign in to comment.