From 4195a345a51e52337bc972aacbce0fd6e88ebb5d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 17 Jan 2016 18:07:50 +0100 Subject: 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. --- player/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/audio.c') 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; -- cgit v1.2.3