diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-30 23:52:56 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-30 23:52:56 +0000 |
| commit | 7478dcb6bac871d7839dad9923cdb2d06cd12790 (patch) | |
| tree | a040d1289b7df50d00438eba1cb7a70ac99c84c1 /src/lib | |
| parent | 6670f11c639e3515256f4f0eb3699e02155f67c9 (diff) | |
Don't flush audio if Player is not supposed to be playing it.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 09a437494..cacb42651 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -375,16 +375,16 @@ void Player::flush () { TimedAudioBuffers<Time> tb = _audio_merger.flush (); - if (tb.audio) { + if (_audio && tb.audio) { Audio (tb.audio, tb.time); _audio_position += _film->audio_frames_to_time (tb.audio->frames ()); } - while (_video_position < _audio_position) { + while (_video && _video_position < _audio_position) { emit_black (); } - while (_audio_position < _video_position) { + while (_audio && _audio_position < _video_position) { emit_silence (_film->time_to_audio_frames (_video_position - _audio_position)); } |
