Skip to content

Commit

Permalink
Don't wait for paused audio to drain. Fixes #11730.
Browse files Browse the repository at this point in the history
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 8b542e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -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))
{
Expand Down

0 comments on commit 8b542e2

Please sign in to comment.