diff options
author | wm4 <wm4@nowhere> | 2016-01-17 18:07:50 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-17 18:38:07 +0100 |
commit | 4195a345a51e52337bc972aacbce0fd6e88ebb5d (patch) | |
tree | 267a57310fffe943845d7ce2058447ccd7f7458d /player/audio.c | |
parent | 004bc9526308c6bc3f51591423e88bb1adaff167 (diff) | |
download | mpv-4195a345a51e52337bc972aacbce0fd6e88ebb5d.tar.bz2 mpv-4195a345a51e52337bc972aacbce0fd6e88ebb5d.tar.xz |
player: refactor: eliminate MPContext.d_video
Eventually we want the VO be driven by a A->V filter, so a decoder
doesn't even have to exist. Some features definitely require a decoder
though (like reporting the decoder in use, hardware decoding, etc.), so
for each thing which accessed d_video, it has to be redecided if and how
it can access decoder state.
At least the "framedrop" property slightly changes semantics: you can
now always set this property, even if no video is active.
Some untested changes in this commit, but our bio-based distributed
test suite has to take care of this.
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/audio.c b/player/audio.c index 0655dda51e..a7a5f727c7 100644 --- a/player/audio.c +++ b/player/audio.c @@ -468,7 +468,7 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip) if (written_pts == MP_NOPTS_VALUE && !mp_audio_buffer_samples(mpctx->ao_buffer)) return false; // no audio read yet - bool sync_to_video = mpctx->d_video && mpctx->sync_audio_to_video && + bool sync_to_video = mpctx->vo_chain && mpctx->sync_audio_to_video && mpctx->video_status != STATUS_EOF; double sync_pts = MP_NOPTS_VALUE; @@ -545,7 +545,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts) return; // try again next iteration } - if (mpctx->d_video && d_audio->pts_reset) { + if (mpctx->vo_chain && d_audio->pts_reset) { MP_VERBOSE(mpctx, "Reset playback due to audio timestamp reset.\n"); reset_playback_state(mpctx); mpctx->sleeptime = 0; |