summaryrefslogtreecommitdiffstats
path: root/player/audio.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-30 23:24:08 +0200
committerwm4 <wm4@nowhere>2014-07-30 23:29:00 +0200
commit1423bd0bfd671ffc023778839a540fffd1dd3686 (patch)
treeeb284a16d71ea8f6ecc6acb815a77ed711ef46da /player/audio.c
parent8f2e9f1d613f686a834446c73465f0ca41156db3 (diff)
downloadmpv-1423bd0bfd671ffc023778839a540fffd1dd3686.tar.bz2
mpv-1423bd0bfd671ffc023778839a540fffd1dd3686.tar.xz
player: move video display code out of the playloop
Basically move the code from playloop.c to video.c. The new function write_video() now contains the code that was part of run_playloop(). There are no functional changes, except handling "new_frame_shown" slightly differently. This is done so that we don't need new a new MPContext field or a return value for write_video() to signal this condition. Instead, it's handled indirectly.
Diffstat (limited to 'player/audio.c')
-rw-r--r--player/audio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index 2491051a54..849944cf91 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -361,7 +361,8 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
struct MPOpts *opts = mpctx->opts;
struct dec_audio *d_audio = mpctx->d_audio;
- assert(d_audio);
+ if (!d_audio)
+ return;
if (!d_audio->afilter || !mpctx->ao) {
// Probe the initial audio format. Returns AD_OK (and does nothing) if