From f4351e6f7d1c36e6ee39b69b79388636e433c401 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 19 Apr 2018 19:16:01 +0200 Subject: audio: fix EOF handling if there was no data at all It stopped and did nothing, instead of terminating (or just letting video play, if there was any video). Regression due to recent filter changes. --- player/audio.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'player/audio.c') diff --git a/player/audio.c b/player/audio.c index 842d965d49..ce9e1cd06b 100644 --- a/player/audio.c +++ b/player/audio.c @@ -805,6 +805,13 @@ void fill_audio_out_buffers(struct MPContext *mpctx) // Probe the initial audio format. mp_pin_out_request_data(ao_c->filter->f->pins[1]); reinit_audio_filters_and_output(mpctx); + if (ao_c->filter->got_output_eof && + mpctx->audio_status != STATUS_EOF) + { + mpctx->audio_status = STATUS_EOF; + MP_VERBOSE(mpctx, "audio EOF without any data\n"); + mp_filter_reset(ao_c->filter->f); + } return; // try again next iteration } -- cgit v1.2.3