diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
commit | ad56f2c46ac6deec86870ec10f2a11a644df07d4 (patch) | |
tree | 89f2d90c5586560911e67c872b530c77f151168d /player/audio.c | |
parent | 0536841647ef7931bffb4386d8ffbb5b2b568e8a (diff) | |
parent | 393bb2a565dc1e27812e1dd20747814892f80da2 (diff) | |
download | mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.bz2 mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/player/audio.c b/player/audio.c index 3a2c60b8ab..2ce1669366 100644 --- a/player/audio.c +++ b/player/audio.c @@ -886,13 +886,18 @@ void fill_audio_out_buffers(struct MPContext *mpctx) assert(mpctx->audio_status >= STATUS_FILLING); + // We already have as much data as the audio device wants, and can start + // writing it any time. + if (mpctx->audio_status == STATUS_FILLING) + mpctx->audio_status = STATUS_READY; + // Even if we're done decoding and syncing, let video start first - this is // required, because sending audio to the AO already starts playback. - if (mpctx->audio_status == STATUS_FILLING && mpctx->vo_chain && - !mpctx->vo_chain->is_coverart && mpctx->video_status <= STATUS_READY) - { - mpctx->audio_status = STATUS_READY; - return; + if (mpctx->audio_status == STATUS_READY) { + if (mpctx->vo_chain && !mpctx->vo_chain->is_coverart && + mpctx->video_status <= STATUS_READY) + return; + MP_VERBOSE(mpctx, "starting audio playback\n"); } bool audio_eof = status == AD_EOF; |